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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
eunji888888
Frequent Visitor

Correct row values but wrong grand total value

I have created the measure:
Measure = SUM('table'[value])/SUM('table'[Qty])
 
It gives the correct row values but wrong in grand total.
 
Do anyone have the idea to solve this problem?
2 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @eunji888888 "
Try :

Measure = SUMx('table','table'[value])/SUM('table'[Qty])

If it won't work :

please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

 

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

vicky_
Super User
Super User

it's a common "problem". see the following blog post - https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/5... or https://www.sqlbi.com/articles/summing-values-for-the-total/ 

but tldr your measure is returning the value (in the totals row) / the qty (in your total row), which i suspect is not what you want.

View solution in original post

2 REPLIES 2
vicky_
Super User
Super User

it's a common "problem". see the following blog post - https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/5... or https://www.sqlbi.com/articles/summing-values-for-the-total/ 

but tldr your measure is returning the value (in the totals row) / the qty (in your total row), which i suspect is not what you want.

Ritaf1983
Super User
Super User

Hi @eunji888888 "
Try :

Measure = SUMx('table','table'[value])/SUM('table'[Qty])

If it won't work :

please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

 

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.