Hi Guyzzz,
Need help
I have a Dimension : DIM with say 10 level Hierarchy.
Have few elements at level ( say 4,5 or 6 any level except the top and leaf level) : AAA, BBB, CCC, DDD, EEE
My requirement is to create a Subset : SUB of Dimension : DIM with all the leaf level elements under these parent elements (AAA, BBB, CCC, DDD)
then will use this subset to create a datasource view for a TI process.
Currently I am using, code like this -
cDimName = 'DIM' ;
cConsol = 'AAA' ;
ExecuteProcess('Bedrock.Dim.Sub.Create.Consolidation.Leaf',
'pDimension', cDimName,
'pSubset', cSubset,
'pConsol', cConsol,
'pAddtoSubset', 0,
'pExclusions', 'Other',
'pDelimiter', '&',
'pDebug', pDebug
) ;[/i]
problem with this code is, I can only create a subset for a single parent out of(AAA, BBB, CCC, DDD)
Need a dynamic subset for this.
Can you help me with the required MDX Expression.
Thnaks,
MDX Expression : Dynamic Subset ( all leaf level elements of multiple consolidated elements of a Dimension)
-
- MVP
- Posts: 1831
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: MDX Expression : Dynamic Subset ( all leaf level elements of multiple consolidated elements of a Dimension)
Not sure what the bedrock process actually does; it could be either using MDX or might just perform a while loop so I will ignore bedrock for this.
The MDX however can be done in many ways; one of the simplest is something like:
And it depends what your actual requirement is but I would be tempted to use a base subset for the initial list of consolidated elements:
Then your base subset can either be a static list or can itself be MDX that is maintained by whether or not an attribute is populated etc.
The MDX however can be done in many ways; one of the simplest is something like:
Code: Select all
{TM1FilterByLevel(
{TM1DrillDownMember(
{[DIM_NAME].[Element1]} + {[DIM_NAME].[Element2]} + ... + {[DIM_NAME].[ElementX]},
ALL, RECURSIVE)
},
0)
}
Code: Select all
{TM1FilterByLevel(
{TM1DrillDownMember(
{[DIM_NAME].[Base_Subset_Name]},
ALL, RECURSIVE)
},
0)
}
Declan Rodger