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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
RealTrentG
New Member

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.

 

RealTrentG_0-1750119947686.png

 

Thanks for the help.  Using Power BI Desktop, Version: 2.144.679.0 64-bit (June, 2025)

6 REPLIES 6
Irwan
Super User
Super User

hello @RealTrentG 

 

i tried your DAX and show right value of rounding

Irwan_0-1750134904039.png

however, the line 4 shows off value, 2,37 become 3,00.

Then you might want to use ROUND()

Irwan_1-1750134995851.png

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

RealTrentG_0-1750267678617.png

...but when I include a group by column, I get the below.

RealTrentG_1-1750267752402.png

 

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)

TypePIECESDivide 3,000Roundup/MERCH REQD
A             8,0002.673.00 
B             4,5001.502.00 
TOTAL          12,5004.175.00 

 

Thanks again

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.



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

Irwan_0-1750310192836.png

 

using ROUNDUP() to roundup closest value.

Irwan_1-1750310249631.png

 

Thank you.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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