Help

Re: ROUNDUP(number, 2) Incorrect rounding

Solved
Jump to Solution
2329 0
cancel
Showing results for 
Search instead for 
Did you mean: 
SPRCHRGR_Airtab
5 - Automation Enthusiast
5 - Automation Enthusiast

I'm rounding up a field called "Total Hours" using ROUNDUP(). Total Hours is a field that adds 2 decimal numbers together. The decimals numbers have up to 3 decimal places.

My understanding is that ROUNDUP({Total Hours}, 2) works like this: it will round up to 2 decimal places if any number after the 2nd decimal place is above 0.

Example ROUNDUP(72.001, 2) = 72.01
                ROUNDUP(72.000,2) = 72.00

The screenshot below shows that this is not what is happening for me.
It's rounding up 72.000 to 72.01. In the screenshot, the error fields are circled in red. The original total hours are in the right most field and the rounded hours are on the left field "(Total Hours Rounded ,2)"

at help.png

Any help is appreciated for this.

1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

It seems that ROUND is a complex calculation and is prone to fractions.
How about adding a FLOOR?

 ROUNDUP(FLOOR({Total Hours},0.001),2)

 

See Solution in Thread

4 Replies 4
Ron_Williams
6 - Interface Innovator
6 - Interface Innovator

Even though it's not visible, there is a 1 somewhere at the end (after 8 decimal spots) in the total hours field. If you change the formula in the total hours field to ROUND(YOUR EXISTING FORMULA,8), it should fix this.

SPRCHRGR_Airtab
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey Ron, thank you for the message.

I'm sure all the numbers that we are adding together only go to 3 decimal places. Not to mention you can even see the sum here at the bottom only goes to 3 decimal places. It doesn't make sense for this to break for multiple records..

SPRCHRGR_Airtab_0-1691614459358.png

I will try your suggestion.



Sho
11 - Venus
11 - Venus

It seems that ROUND is a complex calculation and is prone to fractions.
How about adding a FLOOR?

 ROUNDUP(FLOOR({Total Hours},0.001),2)

 

Thanks Sho! This worked for me.