Using TM1 10.2.2
In TI, is there any quick way to determine if a specific dimension element is a member of an existing static public subset?
I know I could loop through all of the subset members and test each one to see if it matches the specific element - but that seems cumbersome and not speedy.
Determine if an element is a member of a subset
- Alan Kirk
- Site Admin
- Posts: 6606
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Determine if an element is a member of a subset
Funnily enough many of us have been telling IBM that for years.. Do a search on the forum for the word SubIx. Supposedly it may be coming some day following a Request For Enhancement, but for now looping is all you've got.jcr55 wrote:Using TM1 10.2.2
In TI, is there any quick way to determine if a specific dimension element is a member of an existing static public subset?
I know I could loop through all of the subset members and test each one to see if it matches the specific element - but that seems cumbersome and not speedy.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 54
- Joined: Tue May 08, 2012 3:58 pm
- OLAP Product: TM1
- Version: 9.5.2 FP2
- Excel Version: Excel 2007
Re: Determine if an element is a member of a subset
I did look at all of the entries in the Forum for SubIx. Oh my gosh! Clearly there are many people who would like to see that type of command in TI.
Well, maybe one day IBM will provide that functionality...
and pigs will fly...
Well, maybe one day IBM will provide that functionality...
and pigs will fly...
- Alan Kirk
- Site Admin
- Posts: 6606
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Determine if an element is a member of a subset
You're too new here to be that cynical.jcr55 wrote:I did look at all of the entries in the Forum for SubIx. Oh my gosh! Clearly there are many people who would like to see that type of command in TI.
Well, maybe one day IBM will provide that functionality...
and pigs will fly...
Oh wait, you've been here since 2012, no you're not.
At the moment the RFE (that link apparently only works if you are logged in to the IBM site) has 26 votes and is tagged as an "uncommitted candidate". The definition for that is:
Stop swatting, that's not a mosquito, just corporate buzz-speak.Uncommitted Candidate: This request may not be delivered within the release currently under development, but the theme is aligned with the current multi-year strategy. IBM may consider and evaluate any RFE Community feedback for this request through activities such as voting. IBM will update this request in the future.
26 votes is only two behind the overall leader 63589 which is for an AsciiAppend function. 26 doesn't seem many until you think upon how convoluted it is to get to the Request For Enhancement site in the first place, and (probably) how few TM1 users even know about it, and take into account the subset who have both time and inclination to read through the RFEs so that they can vote on them. So anything over 20 votes is probably a pretty widespread issue, regardless of the relative smallness of the number of actual votes.
So we might get it, maybe. If the stars align with the multi-year strategy. Some day. Perhaps. But let's not commit to that.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- MVP
- Posts: 733
- Joined: Wed May 14, 2008 11:06 pm
Re: Determine if an element is a member of a subset
Alan, it took me (more than) a few goes to get there, but finally I got my vote in.
A comment on the use case however:
If you can edit the RFE, can I suggest another use case that might be included in order to bolster the case for this function: a user makes a selection through a picklist and I need to test if the element is part of a 'special' subset e.g. live projects or valid companies etc, and then take further action. A SUBIX or SubsetElementExists function would allow me to perform this in a single IF condition rather than use other less performant methods.
Maybe, by putting the emphasis on enabling user-focused activity then they might sit up and take notice a bit?
jcr55, you could do this:
But it would be much, much better to have the function per the RFE.
A comment on the use case however:
You can quickly solve this with:Alan's RFE wrote:Rather than offer one of my own I'll refer to one that Duncan Turner submitted to Applix on 19 May 2005 (coming up to 10 years ago), for users the world over have had the same problem for the same amount of time:
I am building a subset from a repeating source file e.g. multiple rows contain the same element.
When building a dimension, no duplicates are allowed and so the build is clean. However, when building a subset, each element is inserted one-for-one, resulting in a subset with as many elements as the source has rows.
In order to get a "clean" subset, I am having to either build a temp dimension and then a subset, or loop the subset to check for an element's existence.
Code: Select all
{ Distinct ( TM1SubsetToSet ( [YOUR_DIMENSION], "YOUR_SUBSET_NAME" ) )}
Maybe, by putting the emphasis on enabling user-focused activity then they might sit up and take notice a bit?
jcr55, you could do this:
Code: Select all
SubsetCreateByMdx ( 'TEMP_SUBSET', '{ Intersect ( { [YOUR_DIMENSION].[INPUT_ELEMENT] }, TM1SubsetToSet ( [YOUR_DIMENSION], "YOUR_SUBSET_NAME" ) )}', 'YOUR_DIMENSION' );
IF ( SubsetGetSize( 'YOUR_DIMENSION', 'TEMP_SUBSET' ) > 0 );
# do stuff
ENDIF;
Robin Mackenzie