Mdx Tm1FilterbyPattern

Post Reply
bskalli
Posts: 21
Joined: Wed May 14, 2008 7:53 am

Mdx Tm1FilterbyPattern

Post by bskalli »

How can i use 2 Strings in Tm1FilterbyPattern ? only with Union ?
I am near 255 Characters.

Thanks
standtrue
Posts: 25
Joined: Sat Nov 07, 2009 5:37 am
OLAP Product: TM1, CX
Version: 9.5.2
Excel Version: 2007

Re: Mdx Tm1FilterbyPattern

Post by standtrue »

You can reference subset names in your MDX, so if you are near your character limit you can break your components up. Say you want to filter a Period dimension so that you have elements that start with "N" and elements that start with "S":

Subset 1("N_Periods"):

{TM1FILTERBYPATTERN( {[period].members}, "N*")}

Subset 2("S_Periods"):

{TM1FILTERBYPATTERN( {[period].members}, "S*")}

Final Subset ("N_and_S_Periods"):

Union(
{[period].S_Periods},
{[period].N_Periods}
)
Post Reply