This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I'm trying to do, dynamically, what is the percentage share of the value of the parent row.
In excel, using a pivot table, I can return by clicking on SHOW VALUES AS >> % Total of the parent row.
How can I do this using DAX?
Hi @pfarias ,
Just remove the filter on the table in your denominator of the measure for getting the %. That will do.
Sharing the sample measure that I created. Change it as per your needs
%ofTotal = DIVIDE(SUM('Table'[Amount]), CALCULATE(SUM('Table'[Amount]), REMOVEFILTERS('Table')))
Below is the ss for reference
If this helps, mark it as a solution. You can also appreciate with a kudo!!
If there is only one level, this way it is solved. Now when there are multiple levels? How to do it dynamically?
HI @pfarias ,
I can see this working for both 2 level matrix and 3 level matrix automatically without any changes to the logic.
To help easily solve this, kindly share some sample data and the output that you are expecting to see.
The method you suggest is % of Grand total. The question (which I am also struggling with) is how to show % of parent row. E.g. AA = 156, AC = 67. Parent is A = 223. AA % of parent is 156/223 = 70 %.
Nowadays, this can be done with Visual calculations in PBI, but I need to use measures through field parameters, so the measure needs to exist in the model. And the row level depth is dynamic.
Any help appreciated!
Hi @FilipAi ,
You can achieve this, But a slight modification is required in the DAX we use.
I have taken a different example since I don't anymore have the dataset I was using earlier
The Below is how the DAX will look.
%ofTotal = IF(
ISINSCOPE('Table'[Month]),
DIVIDE(
SUM('Table'[Item Quantity]),
CALCULATE(
SUM('Table'[Item Quantity]),
REMOVEFILTERS('Table'),
VALUES('Table'[Year])
)
),
DIVIDE(
SUM('Table'[Item Quantity]),
CALCULATE(
SUM('Table'[Item Quantity]),
REMOVEFILTERS('Table')
)
)
)
The Screenshot is given below
If you see in the above screenshot, 2023 makes for 47% of total, then considering 2023 as the parent, the Months are shown as % of 2023 with 100% as the total value
Regards,
This works as a simplified solution, if the row fields are static. If the month would be placed above year (e.g. for MoM comparisons), the measure would be incorrect I believe.
The visual calculation method works either way, infortunately not if you want to select measures through field parameters (afaik).
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 28 | |
| 23 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 49 | |
| 47 | |
| 41 | |
| 21 | |
| 19 |