Page 1 of 1

Help with MDX TM1FILTERBYPATTERN

Posted: Sat Aug 29, 2009 5:30 pm
by hlw
hi all,

i have a question about TM1 mdx.

i have a dimension A and want to create a dynamic subset on dimension B where B's name starts with A. Is this possible in TM1?

I am getting some error with TM1FILTERBYPATTERN if I try to use anything besides a hard-coded string pattern like "*--*"... there's a STRTOMEMBER function but no membertoStr function...

does anyone know how to do this with TM1FILTERBYPATTERN? or maybe another way to do this?

thanks in advance!

Re: Help with MDX TM1FILTERBYPATTERN

Posted: Sat Aug 29, 2009 6:14 pm
by Steve Rowe
Hi hlw, I suggest that you post the MDX code that is generating the error message, it's kinda hard to debug a piece of script if you can't see the script! :lol:
Cheers!

Re: Help with MDX TM1FILTERBYPATTERN

Posted: Sat Aug 29, 2009 8:58 pm
by hlw
here's the subset code for dimension B

{TM1FILTERBYPATTERN(
{TM1FILTERBYLEVEL( {TM1SUBSETALL( )}, 1)},
"*=>*"
)}

The above will work, but I really want to use A as the beginning of the pattern.

something like this:

{TM1FILTERBYPATTERN(
{TM1FILTERBYLEVEL( {TM1SUBSETALL( )}, 1)},
[CUBEX].([A].CURRENTMEMBER)) + "=>*"
)}

I am new to mdx, so may not know what I want to do can be done... i was thinking that some type of MemberToStr can get it working... but seems like TM1 doesn't have that function.

tks!