Forum Discussion
Round function not rounding
- 6 years ago
I can't seem to reproduce the problem with hard values:
Table without roundingTable with rounding
I get the same results?
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
Are you using SUM (ROUND ([column]) )? Because that would first ROUND it and then sum the Rounded numbers. The other way arround will sum the colum and then round the result. So if I have two value, 4.02, 5.49 and go with the SUM(ROUND()), it would be 4 + 5 = 9. If I go with ROUND(SUM()) it would be ROUND(4.02+5.49) = ROUND(9.51) = 10.
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
That is helpful and makes sense, but I don't think quite fixes the issue. I wasn't very specific in my initial question, so let me try to do a better job of describing what's going on. I'm actually not using a sum function, I just do not have the other fields that break the data into multiple lines like in the first table so it is presented in a summarized way. So for example:
| Table 1 | |
| Account Number | Amount |
| acct 123 | 128,544.44 |
| acct 345 | 200,000.00 |
| acct 789 | 20,048.44 |
| Table 2- not rounded | |
| Acount Number | Half Amount |
| act 000 | =0.5*Amount |
| Table 2- rounded | |
| Account Number | Half Amount |
| act 000 | =round(0.5*Amount,2) |
The first one that is not rounded gives me the correct number, 174,296.44. The one that is rounded gives me a different number: 174,299.84
It might also be worth mentioning that Amount in the first table has the rounding formula in it as well.
- JarroVGIT6 years agoResident Rockstar
I can't seem to reproduce the problem with hard values:
Table without roundingTable with rounding
I get the same results?
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
- Anonymous6 years agoNot applicable
Thanks for taking a look, that makes me feel better-- I would expect to get the same results as well so I wonder if it's a bug related to the rounding issue in my original question.
- Anonymous6 years agoNot applicable
I am having the same problem. Regardless of how I implement the round function (I have tried every iteration), it seems to have issues. Some of my numbers round while others do not. I believe this is a Power BI bug.
- Echi1 year agoRegular Visitor
I discovered that the Table View> format> rounding needed to be swiched from "auto" to the desired 2 digits.
this seems to hard lock to two digits in the viewed tables, and my csv's now export correctly.
(whereas rounding to 2 digits in Dax or Query kept generating the rounding artifacts.)