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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors