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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Power BI - Decomposition tree values and percentages

I'm using decomposition tree and I want so show off both the value and the percentage. Is it possible?

Additionally, I'm branching it based on a measure, then country, then manufacturer etc. For the percentages, lets say I have manufacturer A with 75 products mark C, and manufacturer B with 25 products mark C. Total si 100 products mark C and I want percentages based on that for every column I have.

AntonioPetak_0-1738931517148.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

Please try this:

Here I create a set of sample:

vzhengdxumsft_0-1739174845732.png

Then add a measure:

MEASURE =
VAR _currentMark =
    SELECTEDVALUE ( 'Table'[product mark] )
VAR _result =
    SUM ( 'Table'[Revenue] )
        / SUMX (
            FILTER ( ALLSELECTED ( 'Table' ), 'Table'[product mark] = _currentMark ),
            'Table'[Revenue]
        )
RETURN
    IF (
        HASONEVALUE ( 'Table'[product mark] ),
        _result,
        SUM ( 'Table'[Revenue] ) / SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Revenue] )
    )

 The result is as follow:

vzhengdxumsft_1-1739175006667.pngvzhengdxumsft_2-1739175013101.png

 

 

Best Regards

Zhengdong Xu
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

7 REPLIES 7
Anonymous
Not applicable

Hi @Anonymous 

 

Please try this:

Here I create a set of sample:

vzhengdxumsft_0-1739174845732.png

Then add a measure:

MEASURE =
VAR _currentMark =
    SELECTEDVALUE ( 'Table'[product mark] )
VAR _result =
    SUM ( 'Table'[Revenue] )
        / SUMX (
            FILTER ( ALLSELECTED ( 'Table' ), 'Table'[product mark] = _currentMark ),
            'Table'[Revenue]
        )
RETURN
    IF (
        HASONEVALUE ( 'Table'[product mark] ),
        _result,
        SUM ( 'Table'[Revenue] ) / SUMX ( ALLSELECTED ( 'Table' ), 'Table'[Revenue] )
    )

 The result is as follow:

vzhengdxumsft_1-1739175006667.pngvzhengdxumsft_2-1739175013101.png

 

 

Best Regards

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

but its t still howing only the % values?? how can i proceed if i wnat both ? pls help

rohit1991
Super User
Super User

Hi @Anonymous ,

Since the Decomposition Tree does not natively support showing both the absolute values and percentages, you can achieve this by creating custom DAX measures that calculate and display them together.

1. Create a Measure for Absolute Values: Total_Products = SUM('Table'[Product_Count])

2. Create a Percentage Measure

Since percentages should be calculated at each level dynamically, use the following measure:

Percentage_of_Total = 
VAR CurrentValue = SUM('Table'[Product_Count])
VAR TotalValue = CALCULATE(SUM('Table'[Product_Count]), ALL('Table'))
RETURN 
    DIVIDE(CurrentValue, TotalValue, 0)

3. Combine Value and Percentage into a Single Measure

Since the Decomposition Tree only allows one numeric value, concatenate the value and percentage into a string:

Value_Percentage = 
VAR CurrentValue = SUM('Table'[Product_Count])
VAR ParentValue = CALCULATE(SUM('Table'[Product_Count]), ALLEXCEPT('Table', 'Table'[Manufacturer]))
VAR Percentage = DIVIDE(CurrentValue, ParentValue, 0)
RETURN 
    FORMAT(CurrentValue, "#,##0") & " (" & FORMAT(Percentage, "0%") & ")"

4. Add the Measure to the Decomposition Tree

  1. Insert a Decomposition Tree visual in Power BI.
  2. Drag the Value_Percentage measure into the Analyze field.
  3. Add Country, Manufacturer, and Product Mark to the Explain by field.
  4. The values will now appear as "Value (Percentage)" in the breakdown.

 

 


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Anonymous
Not applicable

The "Analyze" field requires a number, I can't put a string value inside.

anilelmastasi
Super User
Super User

Hi @Anonymous ,

 

Unfortunately, Power BI’s Decomposition Tree visual does not support displaying both value and percentage together by default. However, there is a workaround to achieve this. Since the Decomposition Tree only allows showing a single numeric value, you can create a measure that concatenates both the actual value and the percentage as a text label.

 

For example:

TotalProducts = CALCULATE(SUM(YourTable[Product Count]), ALL(YourTable)) 

And Percentage Calculation:

Percentage = 
VAR CurrentCount = SUM(YourTable[Product Count])
VAR TotalCount = [TotalProducts]
RETURN
DIVIDE(CurrentCount, TotalCount, 0)

And Combine these values:

ValueAndPercentage = 
VAR CurrentCount = SUM(YourTable[Product Count])
VAR Percent = FORMAT([Percentage], "0.0%")
RETURN
CurrentCount & " (" & Percent & ")"

 

If that works for you, accept as a solution please.

Thank you!

 

Hii, could you pls help me, i tried you rversion for combining both th evalue and percentange , but isnt that measure gonna be a text format... so how can i put into that analyse?

Anonymous
Not applicable

Is it dynamic, will the branching work then? Also, I have 5 categories, not just product, will it work for others?
Also, I have created a measure that combines value and percentage and I can't put it in "Analyze" because now it is a "text" and not a number.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.