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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
cirooric
Regular Visitor

Conditional Decomposition Tree

Hello, I have a dataset of two products classes, "CARPENTRY" and "OXICUT".

Every CARPENTRY code is divided by "Process", "Machineries" and "Material", while every OXICUT code is divided by "Thickness" and "Process".

I would like to represent this division with a decomposition tree where the first level is the "Class" and then, based on the chosen class, the other levels will show.

I had a table of the CARPENTRY codes and a table of the OXICUT codes as shown below:

 

CARPENTRY TableCARPENTRY Table       OXICUT TableOXICUT Table

 

So i merged them in power query, obtaining the TOTAL table:

 

TOTAL TableTOTAL Table

 

I've tried to put in the "Explain by" fields all the columns but i don't know ho to display the respective column based on the chosen class.

 

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

Hi  @cirooric ,

 

You might consider using Append in Power Query.

Merge is different from Append in that Merger allows you to select different types of joins to combine two or more queries by matching values in specified columns.

Merge queries overview - Power Query | Microsoft Learn

The Append approach, however, aggregates the column headings of Table A and Table B to create a new table, appending the rows of Table B to the end of Table A, so that after Append, the data in Table A and Table B are .

Append queries - Power Query | Microsoft Learn

 

Two different ones:

https://powerbidocs.com/2023/03/25/power-bi-merge-queries-vs-append-queries/

In power query – Home – Merge Queries -- Merge Queries as new.

vyangliumsft_0-1697001132156.png

Using the Append table's [Class] as a slicer and placing the data you want to get into the matrix, you can realize which Class is selected to display the corresponding hierarchy.

 

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

1 REPLY 1
v-yangliu-msft
Community Support
Community Support

Hi  @cirooric ,

 

You might consider using Append in Power Query.

Merge is different from Append in that Merger allows you to select different types of joins to combine two or more queries by matching values in specified columns.

Merge queries overview - Power Query | Microsoft Learn

The Append approach, however, aggregates the column headings of Table A and Table B to create a new table, appending the rows of Table B to the end of Table A, so that after Append, the data in Table A and Table B are .

Append queries - Power Query | Microsoft Learn

 

Two different ones:

https://powerbidocs.com/2023/03/25/power-bi-merge-queries-vs-append-queries/

In power query – Home – Merge Queries -- Merge Queries as new.

vyangliumsft_0-1697001132156.png

Using the Append table's [Class] as a slicer and placing the data you want to get into the matrix, you can realize which Class is selected to display the corresponding hierarchy.

 

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors