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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Total Error

Greetings community. My query is as follows:

I've generated a Power BI report, where the total sale is equal to the price for units sold. The total for each row is correct, but the grand total gives me a disproportionate result.

Reviewing, the total in the COR Sales column is calculated with the total in the Price column times the total in the Und Sales column, when it should be the sum of the products sold. Could you give me ideas of why this is so?

As a fact, the total of the units sold is taken out by adding to the previous balance, the warehouse entries, subtracting the returns and the final balance.

Best regards.

jucarino89_0-1719807995156.pngjucarino89_1-1719808015417.pngjucarino89_2-1719808049039.pngjucarino89_3-1719808064888.png

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Greetings to all. I share with you the example files. According to the BI, the income from sales on 03/07 is 3,570; however, in the "data" file, the correct sum appears: 2,570

jucarino89_0-1720067821544.png

jucarino89_1-1720068068597.png

Ejercicio.xlsx

data.xlsx

Exercise.pbix

Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Thanks for the reply from @Ritaf1983 . Here I have another idea in mind, and I would like to share it for reference.

 

Measures respect the context of the Total row and is calculated within that context. For a simple example, we need to subtract sales by one, here we create the measure and find that total is wrong. This is because the measure is performing a calculation on all the rows in the table, and the calculation is 8-1=7. So we can use hasonevalue or hasonefilter to control total separately.

 

 

vlinhuizhmsft_2-1720058310952.png

 

 

 

vlinhuizhmsft_3-1720058360049.png

 

 

You can refer to the linked blog post: Dealing with Measure Totals - Microsoft Fabric Community and Measure Totals, The Final Word - Microsoft Fabric Community

 

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Zhu
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

 

Ritaf1983
Super User
Super User

Hi @Syndicate_Admin 
Try to use sumx instead of sum.
+

Please refer to the linked blog posts :

https://blog.finance-bi.com/power-bi-totals-incorrect/

https://archerpoint.com/how-to-make-measures-total-correctly-in-power-bi-tables/

for more specific assistance 

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors