Forum Discussion
SUM in PowerBI not rounding correctly
Can you provide a picture of the amount of all the rows contained in that order, in the data view (See below)? Please also modify the decimals in the column so that you show atleast 5 decimals.
Br,
J
Hi, So i'm using direct query - and for that order there is only a single transaction - so it isn't actually having to sum anything.
Five decimal places:
41.89490 is not rounding correctly - it should be 41.90 not 41.89
- tex6285 years ago
Community Champion
I believe this has to do with direct query. I've been able to recreate your problem and I'm running a few tests. I'll get back to you.
/ J - tex6285 years ago
Community Champion
After consulting a colleague I was told the rounding should be correct :). When rounding you consider all decimals ->
10,645
0,0005 Rounds up to
10,65
10,645
0,0045 Rounds down to
10,6
So in the second example you round from 0,0045, not 0,005.
If you want any other type of logic you will need to convert the actual column before the automated rounding happens. You can do this by identifying where the decimals create this situation, XXX.XX4(5-9) (3rd decimal is a "4" & 4th is 5 or higher). Then change the actual values to allow the rounding to work as you desire.
Br,
J - GDUb3 years ago
Advocate I
The rounded value of 41.89490 is 41.89 using standard rounding calculation. .00490 is less than 0.005, so it rounds down to zero at two decimal places. 0.0050 and greater rounds up to 0.01