Help

Re: Rounding decimal points

3085 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Gokul_Kumar
6 - Interface Innovator
6 - Interface Innovator

Hi,
I am trying to replicate payout from server. The server calculates 34.9345 as 34.94 but on airtable it gets rounded off as 34.93

What should I do to make sure it gives the same value 34.94?

Thanks in advance

Regards,
Gokul

3 Replies 3
Izaac_Post
6 - Interface Innovator
6 - Interface Innovator

You probably won’t like my solution, but I found a way around it. You can view it (and even add it to your own AirTable Account using the “Copy Base” button in the top right corner) here: https://airtable.com/shrghj26WggRFFoOy

What I did:

Column 1
Type of Field: Text (only way for it to work)

Column 2
Type of Field: Formula
Formula: SEARCH(".", Number)

Column 3
Type of Field: Formula
Formula: VALUE(IF(MID(Number, VALUE({Decimal Position}) + 3, 1) > 0, REPLACE(Number, VALUE({Decimal Position}) + 3, 1, "9"),Number))
Format: Decimal; Precision: 1.00

There probably is a better way, and the official formula guide says that the “ROUND” function rounds up… but I couldn’t get it to work. If you are curious, you can check that out here: https://support.airtable.com/hc/en-us/articles/203255215-Formula-field-reference

Kasra_Kyanzade1
6 - Interface Innovator
6 - Interface Innovator

A simpler solution might be use a formula like this:

ROUND(Amount + 0.00499, 2)

@Izaac_Post when using the ROUND formula, you have to also make sure to update the “Formatting” of the of formula so it displays the correct precision:

Screen Shot 2016-08-06 at 8.02.42 PM.png

That would be a much better solution! Thanks for sharing, that will save me time in the future too!