Page 1 of 1

Question for filter based subset

Posted: Thu Oct 26, 2017 8:45 pm
by daheezy
Hi all,

Relatively new to TM1 and also the forum (1st post). Apologies in advance for my newbie type question.

I'm trying to create a filter based dynamic subset that includes all level 0 elements except for elements that begin with "02"

Any suggestions for writing that into the expression window are appreciated!

Re: Question for filter based subset

Posted: Thu Oct 26, 2017 9:29 pm
by tomok
If you plan on creating MDX-based subsets you should definitely read the MDX Primer http://www.bihints.com/except_and_valid ... ierarchies. EXCEPT is the function you're after.

Re: Question for filter based subset

Posted: Thu Oct 26, 2017 9:47 pm
by daheezy
Hi Tom,

Thanks for the reference. I was able to figure it out using the exception function.

{EXCEPT( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [DIM1] )}, 0)}, {TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [DIM1] )}, 0)}, "02*")})}

Re: Question for filter based subset

Posted: Fri Oct 27, 2017 5:56 am
by Wim Gielis
Hello

I would also use this expression. The alternative with the Instr function I find less interesting.