Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding all leaf members in a ragged hierarchy

Status
Not open for further replies.

Vivarto

Programmer
Nov 27, 2005
43
AU
Away from ReportStudio for a number of years so a bit rusty. Thought this should be simple but can't see how to do it. Can't see an answer posted.

How do I create a set of all the leaf members of a ragged hierarchy? Don't think I can use descendents() as there isn't a named level or a fixed distance from the root member to each leaf.

I don't have the option of changing the dimension structure in the cube (TM1)

Am I missing something simple here?


 
No takers? I've scoured the Cognos user guide and there are warnings about unpredictable ragged hierarchy behaviour but nothing about how to work with them. I get the impression that in the ReportStudio view of the world it would be better if ragged hierarchies didn't exist - but they do and they're common so I'm hoping someone has already come across and solved this problem.

I was thinking that I would need to identify the full set of all members in the hierarchy then subtract those that are parents however I can't generate a set of parent members with:

parent( members( [Cube].[Dimension].[Hierarchy] ))

as parent() is expecting a member as its argument not a member set.

Again, any thoughts?

 
Still can't do this but have developed a work-around. Set up an attribute, Leaf Level, in the source dimension. Create data item with filter() and select on the attribute:

filter(
[Cube].[Dimension].[Hierarchy],
[Cube].[Dimension].[Hierarchy].[Leaf Level] = 'Y')

Think getting leaf members in ragged hierarchies is in the too-hard basket. No one has proved me wrong...yet?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top