Product:
Planning Analytics 2.0.6
Microsoft Windows 2012 server
Problem:
How make a subset of a dimension, where i want all elements that start with BSA* and some other letters, like BSB and BSC?
Suggested Solution:
In your prolog section of the TI process, use UNION, similar to this:
sSubset=’export’;
pDim13=’company’;
StringMDX = ‘ (UNION(
(UNION (
{UNION( { TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [ ‘ | pDim13 | ‘ ] )}, 0)}, “BSA*” ) } ,
{ TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [ ‘ | pDim13 | ‘ ] )}, 0)}, “BSB*” ) } )} ,
{UNION( { TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [ ‘ | pDim13 | ‘ ] )}, 0)}, “BSC*” ) } ,
{ TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [ ‘ | pDim13 | ‘ ] )}, 0)}, “BSD*” ) } )} )) ,
(UNION (
{UNION( { TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [ ‘ | pDim13 | ‘ ] )}, 0)}, “BSE*” ) } ,
{ TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [ ‘ | pDim13 | ‘ ] )}, 0)}, “BSF*” ) } )} ,
{UNION( { TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [ ‘ | pDim13 | ‘ ] )}, 0)}, “BSH*” ) } ,
{ TM1FILTERBYPATTERN( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [ ‘ | pDim13 | ‘ ] )}, 0)}, “BSJ*” ) } )} ))
)) ‘;
SubsetCreatebyMDX( sSubset ,StringMDX);
This can be solved in other ways, this is only a suggestion.
More Information:
http://www.wimgielis.com/tm1_mdxstatements_EN.htm