Hi All,
Environment:
- Cognos 8.2
- OLAP
- Report Studio
I have multiple levels within the GL Account hierarchy structure.
How do I select one level, and it's sub levels only?
Example:
1
1.2
1.2a
2
2.1
2.1a
2.1b
I have tried using hierarchy(1.2) and get the levels below 1.2 and also the
other category and levels under 2. Since the GLAccount structure can change on
a weekly basis, the function needs to be dynamic. I cannot use the except and set
function to list all levels I do not want.
Thank you in advance for the help.
Ryan
What do you mean by the structure being dynamic? Assuming that you know the name or part of the name of your level you could use the filter function
filter([CUBE_NAME].[DIMENSION_NAME].[HIERARCHY_NAME].[LEVEL_NAME], caption([CUBE_NAME].[DIMENSION_NAME].[HIERARCHY_NAME].[LEVEL_NAME]) = 'NAME')
Children of this level can be obtained by nesting another data item with the following function
children(currentMember ( [CUBE_NAME].[DIMENSION_NAME].[HIERARCHY_NAME] ))
Thanks redmist..
The hierarchy must be dynamic, meaning I cannot use a tuple or use each level per row.
I tried your recommended solution and found it only brings in the level filtered on and not all levels below within the same hierarchy.
The structure is similar the example displayed in the original post. I need all levels within catagory 1, not the levels in catagory 2.
Any other recommendations, please? :)
Hi,
Is this as simple as defining a context (slicer) filter in the query for member 1?
MF.
Try descendants instead of children.