Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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)
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.
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!
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.
Not exactly. I want so sum the pieces first and then calculate the MERCH REQD. In this example, it works out that I should end up with 3.00 since 7,793/3,000 = 2.6, which rounds up to 3.00. But in the scenario below, if I use the MAX function I would end up with 3.00 MERCH REQD, but I should have 5.00 based on the Total PIECES of 12,500 (12,500/3,000 = 4.17, roundup to 5.00)
Type | PIECES | Divide 3,000 | Roundup/MERCH REQD | |
A | 8,000 | 2.67 | 3.00 | |
B | 4,500 | 1.50 | 2.00 | |
TOTAL | 12,500 | 4.17 | 5.00 |
Thanks again
Hi @RealTrentG ,
Thank you for reaching out to Microsoft Community.
I hope the below measure works as per your requirement.
hello @RealTrentG
i am confused.
based on your previous post, i assumed you want to get the max value then use MAX.
if you want to get sum, then use sum.
Total calculation in table is based on what function you are using.
using ROUND() to round closest value
using ROUNDUP() to roundup closest value.
Thank you.
User | Count |
---|---|
85 | |
80 | |
76 | |
49 | |
41 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |