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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ACraig08
Helper III
Helper III

Column Calculations

Hello, I have a field "% of Cost" that is a calculated column dividing the Total Cost by the Cost. It is added to a table like this...

ACraig08_1-1748965268815.png

I am trying to figure out how instead of the total at the top summing the percentages it could show the percentage of the Total Cost/Cost totals. So I wrote in red what I would like it to show (980,857/9,079,297).

 

I hope that made sense!

Thank you!

1 ACCEPTED SOLUTION
ajaybabuinturi
Super User
Super User

Hi @ACraig08,
You need to modify the calculated field so that it calculates the ratio at the aggregate level, not summing the row-level percentages.
Instead of using a calculated column, you should use a DAX measure

% of Cost = DIVIDE(SUM('Table'[Total Cost]), SUM('Table'[Cost]))

Please let me know if you have any questions.

 

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

View solution in original post

2 REPLIES 2
SundarRaj
Super User
Super User

Hi @ACraig08 , I think what you need to do is concatenate. Let me know if this is what you are looking for?

SundarRaj_0-1748966554462.png

1. Create an additonal Calculated Column using the code :

Division = FORMAT( [Total Cost] , "0,###" ) & "/" & FORMAT( [Cost] , "0,###" )

Sundar Rajagopalan
ajaybabuinturi
Super User
Super User

Hi @ACraig08,
You need to modify the calculated field so that it calculates the ratio at the aggregate level, not summing the row-level percentages.
Instead of using a calculated column, you should use a DAX measure

% of Cost = DIVIDE(SUM('Table'[Total Cost]), SUM('Table'[Cost]))

Please let me know if you have any questions.

 

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.