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

A 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.

Reply
pfarias
Advocate II
Advocate II

Return the percent total of the parent row

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?

 

Sample_BI_Percent.png

6 REPLIES 6
Thejeswar
Super User
Super User

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

Thejeswar_0-1673616032926.png

 

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.

Thejeswar_1-1673866192352.png

 

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

Thejeswar_0-1750825061986.png
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).

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 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.