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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Rygaard
Resolver I
Resolver I

SUM function is wrong on 17 decimal ? (both in excel and in power BI)

Is there a fix besides making a filter that filters out obviously wrong numbers ?

 

 

OK  - so i have an Avarage price :-241.431.642.836.356.400,00   (241 quadrillion)   but my Tonnage is 0 and my amount is -13724

 

But really my amount and my avarage and my tonnage should be zero, since its invoices beeing cancled out.

 

First i "blamed" a collegue for typing manualy, since there was an error, but ther is no error, after exporting to the table to excel i get this strange result  (this is the tonnage)

 

2020-02-05 excel sum is wrong.png

 

 

and its not the first time I have seen strange Sum() errors in excel and Power BI - is ther any fix, other than have your filter filter out this ?

 

 

you can try this yourself by typing theese numers in excel:

1.224,58 kr.
-1.224,58 kr.
102,08 kr.
-1.312,26 kr.
102,05 kr.
-2.953,90 kr.
4.086,65 kr.

 

Then taking a sum and you will get : 

                                                                24,6199999999999    

  (should be 24,62 kr  no decimals)

 

and if you add the numbers manualy in this order : (=A1+A2+A3+A4+A5+A6+A7)  you get 

                    24,6200000000003    

But if you add the numeers manualy in this order : (=A7+A1+A2+A3+A4+A5+A6) you get 

                    24,6199999999999    

 

2020-02-05 16_34_54-Excel fejl på 13 decimal.png

3 REPLIES 3
v-eachen-msft
Community Support
Community Support

Hi @Rygaard ,

 

I can't reproduce this problem. You could provide your sample pbix file to us if you don't have any confidential information? Please upload your files to OneDrive and share the link here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Rygaard -

This recently came up in the Excel Community. I had never experienced it so I am not an expert by any means. Take a look at https://www.microsoft.com/en-us/microsoft-365/blog/2008/04/10/understanding-floating-point-precision... and https://community.powerbi.com/t5/Desktop/Decimal-Values-Precision/td-p/375433. Hopefully it helps.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Tad17
Solution Sage
Solution Sage

Have you made sure your decimal vs comma usage are in agreement?

 

It looks like you have a mixed of European and American numbers in there.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.