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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

hierarchy in multiple tabels

Hello guys, I am new to this subject and I was wonderig if I could get some help from you!

 

So I am now working on a dataset that is about some tasks that a company has to do. There is a table with all the details of each task like this:

 

Tasks

TaskID

Description

NumberOfWorkersExpectedTime
1Clean something11h
2Fix something22h

 

But then there are some tables regarding the risks that each task can have, as well as "sub-risks". For exemple:

 

MechanicalRisks

TasksIDObjectsFallPerfurationProjections
1TRUEFALSETRUE
2FALSEFALSEFALSE

 

FireRisks

TasksIDElectricalOriginFuelOriginGasOrigin
1TRUETRUETRUE
2FALSETRUEFALSE

 

The tables are connected this way:

Tasks[TaksID] 1 - 1 MechanicalRisks[TasksID]

Tasks[TaksID] 1 - 1 FireRisks[TasksID]

 

I would like to create a sunburst graphic like this one:

jorgepinho_0-1637153232362.png

Where the area would be MechanicalRisks, FireRisks and the Category would be ObjectsFall, Perfuration and Projection for the MechanicalRisks' Area and ElectricalOrigin, FuelOrigin, GasOrigin for the FireRisks' Area.

 

The values would be regarding the count of TRUE values.

 

Can you help me out? I can't creat a hierarchy, neither creating a measure for the values.

 

Thank you so much in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

Here are the steps you can follow:

1. Enter the power query, Home – Merge Queries – Merge Queries as New

vyangliumsft_0-1637562385928.png

vyangliumsft_1-1637562385930.png

Result:

vyangliumsft_2-1637562385932.png

2. Select [TaskID] in the Merge1 table and click Tramsform – Unpivot Columns - Unpivot Other Columns.

vyangliumsft_3-1637562385933.png

Result:

vyangliumsft_4-1637562385934.png

3. Create measure.

Flag =
COUNTX(FILTER(
'Merge1','Merge1'[Value]=TRUE()),[Attribute])

4. Result:

Choose Donut chart.

Display the count of Task ID grouping as True:

vyangliumsft_5-1637562385935.png

 

Click Drill down to display the next level. When grouping by Attribute, the count is True.

vyangliumsft_6-1637562385937.png

 

 

Best Regards,

Liu Yang

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

2 REPLIES 2
Anonymous
Not applicable

Thank you so so much!

Anonymous
Not applicable

Hi  @Anonymous ,

Here are the steps you can follow:

1. Enter the power query, Home – Merge Queries – Merge Queries as New

vyangliumsft_0-1637562385928.png

vyangliumsft_1-1637562385930.png

Result:

vyangliumsft_2-1637562385932.png

2. Select [TaskID] in the Merge1 table and click Tramsform – Unpivot Columns - Unpivot Other Columns.

vyangliumsft_3-1637562385933.png

Result:

vyangliumsft_4-1637562385934.png

3. Create measure.

Flag =
COUNTX(FILTER(
'Merge1','Merge1'[Value]=TRUE()),[Attribute])

4. Result:

Choose Donut chart.

Display the count of Task ID grouping as True:

vyangliumsft_5-1637562385935.png

 

Click Drill down to display the next level. When grouping by Attribute, the count is True.

vyangliumsft_6-1637562385937.png

 

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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