Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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:

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!

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

    Here are the steps you can follow:

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

    Result:

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

    Result:

    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:

     

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

     

     

    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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous ,

    Here are the steps you can follow:

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

    Result:

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

    Result:

    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:

     

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

     

     

    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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thank you so so much!