How can i use 2 Strings in Tm1FilterbyPattern ? only with Union ?
I am near 255 Characters.
Thanks
Mdx Tm1FilterbyPattern
-
- Posts: 25
- Joined: Sat Nov 07, 2009 5:37 am
- OLAP Product: TM1, CX
- Version: 9.5.2
- Excel Version: 2007
Re: Mdx Tm1FilterbyPattern
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}
)
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}
)