Forum Discussion

zubair242's avatar
zubair242
Frequent Visitor
2 years ago

Traverse parent-child relationship in power query

Hi everyone,

I have a scenario where I have parent-child relationship. In the picture below, you can see that Account is the parent of Client and Account is the Child of Advisor. So, if we change anything in the Advisor, Client will be impacted. However, in the current setup, if I filter on Advisor, it will show only impact of Account and not on client. How can I do this in power query so that I get all the nodes in the hierarchy?

 

 

Sample file is attached. I have given it a try but it is not working as intended.

 

https://drive.google.com/file/d/1WOUz-M8UN_ubCOPgkkv7p2dNJL9GqMs6/view?usp=sharing

 

 

 

 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    zubair242  Power query alone may not be sufficient for this, its about how you structure your data and your data model in power bi. Ensure that your data source includes a column that establishes the parent-child relationship. Create hierarchies to define relationship between Avisor, Account and Client, in model view for each relationship make sure that cross filtering is enabled in both direction.