Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Good Afternoon everyone.
I have spent a few hours try to make it works, but I could. Maybe one of you could light up my thoughts.
I have a summary table that has values UNIQUEID, Graduated (Yes/NO), Field (STEM, Health Sciences, Business, etc), Transferred (Yes/No) and Transferred Field(STEM, Health Sciences and etc).
The table has the correct format and I am getting the values I am looking for.
I created this decomposition tree.
Percentage of Parent Level =
DIVIDE(
COUNT(SummaryTable[ID]),
CALCULATE(
COUNT(SummaryTable[ID]),
ALLSELECTED(SummaryTable)
)
)
That is the dax measure that I am using to calculate the percentage and I am adding that as tooltip.
The value is correct for the first branch since it consider the total cohort.
The issue starts when I got to the second branch. The Percentagen of the Yes I would like to be considerer from the Total of STEM and no longer from Total Cohort.
In my current setup the tooltip for yes show me: 23.67%. That is correct if we divide 392 by 1656. But I would like to be 42.66%, dividing the 392 by 919.
Here is the code that I used to create the summary table:
SummaryTable =
SUMMARIZE(
X_cohort,
X_cohort[ID],
"Graduated", MAX(X_cohort[Graduated]),
"Academic_field", MAX(X_cohort[Academic_field]),
"Transferred", MAX(X_cohort[Transferred]),
"Transferred_Field", MAX(X_cohort[Transferred Field])
)
Please, if anybody have a different approach, please, let me know. I would appreciate it
To calculate the percentage of the parent level correctly in a decomposition tree, you need to adjust your DAX measure to consider the context of the parent node. This means that when you drill down to the second branch, the percentage should be calculated based on the total of the parent node rather than the total cohort.
Here’s how you can adjust your DAX measure:
Create a Measure for the Parent Level
ParentLevelCount =
CALCULATE(
COUNT(SummaryTable[ID]),
ALLSELECTED(SummaryTable),
REMOVEFILTERS(SummaryTable[Graduated])
)
PercentageOfParentLevel =
DIVIDE(
COUNT(SummaryTable[ID]),
[ParentLevelCount]
)
Add the Measure to Your Decomposition Tree:
Set Up the Tooltip:
This setup will ensure that the percentage is calculated correctly based on the parent node, providing the desired result when you drill down into the branches.
Thank you for replying, but the output with the adjusted DAX got me the same what I was getting before 😞
Hi @carlosbarbosa ,
I create a table as an example.
Actually when you add Decomposition tree visual.
Once you add the content you need in the appropriate places, the percentages are actually realized based on what you want.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for replying. I see that you were using the an alternative visual.
I added that one and it worked that way I intended until the second level, but that visual didn't let me adding more.
I add an extra column in your table and adjusted your visual and didn't work either. Thank you tho.
Not exactly what you are looking for but a potential alternative.
I have tried that but that takes the percentage of the Total (top parent). In my sitatuon I would like to know how is the percetagem of the students who graduated transferred to another institution.
Thanks for replying tho
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
97 | |
87 | |
43 | |
40 | |
35 |