Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Alexandra_B
Helper III
Helper III

Hierarchy from multiple tables

Hello. Help, please!

I have a number of tables in Power BI desktop (loaded JSON files).

Each files contains the same columns, but with different values.

 

Alexandra_B_1-1692806407574.png

 

Please see in the picture above how I need them corellated.

Each parent and child is a JSON file, therefore a table, so I have 20 tables.

 

How could I link them to create a hierarchy as described?

Each table contains the following.

After I create a hierarchy, I would like to add a filter, so whenever the client selects a Parent, he can go deeper into children`s data/ sub-children if related.

 

Alexandra_B_2-1692806649357.png

 

Please, please, tell me there is an option as I`ve been searching a lot and cannot find an answer. 😞

 

Thank you in advance.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Alexandra_B , Append then in single table and use path and path length in DAX

https://radacad.com/parsing-organizational-hierarchy-or-chart-of-accounts-in-power-bi-with-parent-ch...

https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Alexandra_B , Append then in single table and use path and path length in DAX

https://radacad.com/parsing-organizational-hierarchy-or-chart-of-accounts-in-power-bi-with-parent-ch...

https://www.sqlbi.com/articles/clever-hierarchy-handling-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak, I`ve sorted it out with Merge and followed the steps from links (path and pathlength). Then I created a relationship between the hierarchy table and the unpivoted merged table and it works. Thank you for your help!

@amitchandak, thank you.

I have apended them in a single table, but how do I differentiate them?

Alexandra_B_0-1692870374879.png

 

Alexandra_B_1-1692870531186.png

 I have tried to merge them, but I`m getting lost at "Join kind" and then it`s taking ages to load 😞

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.