Skip to content

How to access two levels with the same name in different hierarchies? #667

Answered by bloussou
chris-horril asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
When you have multiple levels with the same name in different hierarchies you need to provide a tuple (<HIERARCHY_NAME>, <LEVEL_NAME>) instead of just using the level name.
If I have two levels Country, one on hierarchy Country the other one on hierarchy Geography I have to do:

l = cube.levels
- l["Country"] # Will throw since two levels have the same name
+ l["Geography", "Country"] # From Geography hierarchy
+ l["Country", "Country"] # From Country hierarchy

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Skyscimitar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #666 on August 10, 2022 09:29.