Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving hierarchy nodes with power_bi.get_member_properties on alternative hierarchy #868

Closed
MariusWirtz opened this issue Mar 6, 2023 Discussed in #866 · 0 comments · Fixed by #876
Closed

Retrieving hierarchy nodes with power_bi.get_member_properties on alternative hierarchy #868

MariusWirtz opened this issue Mar 6, 2023 Discussed in #866 · 0 comments · Fixed by #876
Labels

Comments

@MariusWirtz
Copy link
Collaborator

Discussed in #866

Originally posted by Sven-Bo March 3, 2023
The "TM1py Region" dimension has two hierarchies: the default hierarchy "TM1py Region" and the alternative hierarchy "TM1py City". Here is a screenshot of my "TM1py Region" dimension:
dimension

When I use the default hierarchy, "TM1py Region", the levels are present in the resulting dataframe. This is the code I used:

df = tm1.power_bi.get_member_properties(
    dimension_name="TM1py Region",
    hierarchy_name="TM1py Region",
)

dataframe_default_hierarchy

However, when I use the power_bi.get_member_properties function to retrieve hierarchy nodes from the "TM1py City" hierarchy, the levels are not returned in the resulting dataframe. This is the code I used:

df = tm1.power_bi.get_member_properties(
    dimension_name="TM1py Region",
    hierarchy_name="TM1py City",
)

And this is the resulting dataframe:
dataframe_alt_hierarchy

I'm wondering if this is expected behaviour and how I can retrieve the levels when using an alternative hierarchy.

Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant