Forum Discussion
Power BI roundup not calculating correctly
Trying to use the ROUNDUP function to round a column I created in a table, but it is not rounding properly in all cases. The 'PEOPLE REQD' column is just the 'PIECES' column divided by 3,000, no problem. The 'ROUNDUP COL' is where I am trying to round up to the nearest whole number. Notice the first record for 8,343 'PIECES' has 2.78 'ROUNDUP COL' , which rounds up to 3.00 in the 'ROUNDUP COL' (all good). However, the second record for 5,127 'PIECES' has 1.71 'PEOPLE REQD', but for some reason is rounding to 4.00 in the 'ROUNDUP COL', instead of 2.0.
My formula in the 'ROUNDUP COL' = ROUNDUP(INVENTORY[PEOPLE REQD],0) pretty simple so unsure why not working.
Thanks for the help. Using Power BI Desktop, Version: 2.144.679.0 64-bit (June, 2025)
Hi RealTrentG ,
Thank you for reaching out to Microsoft Community.
I hope the below measure works as per your requirement.MERCH REQD = ROUNDUP(SUM('Table (2)'[PIECES]) / 3000, 0)
If this helped, please mark it as the solution so others can benefit too. And if you found it useful, kudos are always appreciated.
Thanks,
Chaithra E.
9 Replies
- Irwan
Super User
hello RealTrentG
i tried your DAX and show right value of rounding
however, the line 4 shows off value, 2,37 become 3,00.
Then you might want to use ROUND()
with ROUND(), 2,37 become 2,00
Thank you.
- RealTrentGFrequent Visitor
Thanks for the reply Irwan. It is still not calculating correctly, but I think I know why. I am summing two records together and PowerBI is summing the columns of each, rather than using the summed value, see below.
This one is good, calculating correctly
...but when I include a group by column, I get the below.
So the total PIECES of 7,793 is correct, but the MERCH REQD column (formerly Roundup Col), should be 3, not 4. Seems in the background Power BI is adding the two individual records from first screen shot above rather than performing a new calc on the grouped PIECES column. Any thoughts on how to prevent this?
Thanks!
- Irwan
Super User
hello RealTrentG
yes, as you mentioned table visual total value is summing so 3,00 +1,00.
you need to change [MERCH REQD] so it will collect 3,00.
if you want to get that 3,00, then you might want to use MAX for [MERCH REQD] instead of SUM because you want to get the highest value.
Thank you.
- v-echaithra
Community Support
Hi RealTrentG ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Chaithra. - v-echaithra
Community Support
Hi RealTrentG ,
We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.Regards,
Chaithra. - v-echaithra
Community Support
Hi RealTrentG ,
May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Regards,
Chaithra.