Showing results for 
Search instead for 
Did you mean: 
Helper III
Helper III

DAX Calculate Percentage from Column Total

I am trying to build a tabular cube measure that will always calculate the percentage from the column total even when using a matrix.

Percentage from total.JPG


In the example attached i would like to get X % of Total and Y % of Toal columns.
The measure should be dynamic and work with regardless of the dimension the user will place in the columns so the option of using Calculate(SUM(Salse_Quantity),ALL(Products[Product Name])) or                    Calculate(SUM(Salse_Quantity),ALLSELECTED(Products)) is not good enough.


Is there any way to achieve this?



Solution Supplier
Solution Supplier

You cannot detect what is on rows or what is on columns in DAX, so you cannot do a true "Column Total". However, something like this, may work for you:


SUM(Salse_Quantity) /






Helpful resources

PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!


The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors