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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors