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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
cm008507
Frequent Visitor

Add a column that shows the percent contribution to the total of another column

I have a table visual with a cost category column with the total costs for each category.  PowerBI then provides the overall total for all of the rows.   I would like to add a column that shows the percent contribution of the overall total from each cost category.    Would I use a calculated column or measure or other?   

2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @cm008507 
you can use a measure with dax "all" function.

%fromAll = SUM('Table'[value])/CALCULATE(sum('Table'[value]),all('Table'[Category]))

Ritaf1983_0-1684378283483.png

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

That worked perfectly!  Thank-you Ritaf1983.

View solution in original post

5 REPLIES 5
Ritaf1983
Super User
Super User

Hi @cm008507 
you can use a measure with dax "all" function.

%fromAll = SUM('Table'[value])/CALCULATE(sum('Table'[value]),all('Table'[Category]))

Ritaf1983_0-1684378283483.png

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

That worked perfectly!  Thank-you Ritaf1983.

It was my pleasure to assist 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Syk
Super User
Super User

From what you described, you could use a measure. You could also likely just reselct your cost column and select show value as a % of grand total.

 

Syk_0-1684345007675.png

Syk_2-1684345053741.png

 

 

I was here with the same question.  Sometimes the easiest answer is right in front of your face.  Thank you!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.