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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Kish1999
Helper II
Helper II

How to establish Hierarchy in case of Multiple hierarchies

Hello All,

 

I am working on a requirement where I have to establish multiple Hierachies.

 

Example:

KeyParent1 KeyParent2 Key
32432419700
325324 
326324 
327324 
32832819400
329328 
330328 
331331 
332331 
333331 
Table 2  
KeyHours 
324100 
325200 
326100 
327100 
328100 
329100 
330100 
331100 
332100 
333100 

 

In the above table Parent1 key is the immediate parent of Key column and Parent2 key is the parent of parent1.  The requiremnt is to get all the keys associated with Parent 2 and get the total hours for them. I have tried using multiple measures and functions like path but i am not getting the correct result. Can you please help me get the summed up hours on the basis of Parent 2 keys.

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Kish1999 ,

 

What is the Parent key2 in the blank values? If your hierarchy is like this:

vjianbolimsft_0-1662343160288.png

You can create a the Hierarchy in Matrix visual directly, please try:

First, build the relationship between the two tables:

vjianbolimsft_1-1662343247660.png

Then add the key columns to the rows field:

vjianbolimsft_2-1662343317918.png

Final output:

vjianbolimsft_3-1662343338787.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

1 REPLY 1
v-jianboli-msft
Community Support
Community Support

Hi @Kish1999 ,

 

What is the Parent key2 in the blank values? If your hierarchy is like this:

vjianbolimsft_0-1662343160288.png

You can create a the Hierarchy in Matrix visual directly, please try:

First, build the relationship between the two tables:

vjianbolimsft_1-1662343247660.png

Then add the key columns to the rows field:

vjianbolimsft_2-1662343317918.png

Final output:

vjianbolimsft_3-1662343338787.png

Best Regards,

Jianbo Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.