Help

Why isn't this 0? What is it

Topic Labels: Formulas
Solved
Jump to Solution
1002 4
cancel
Showing results for 
Search instead for 
Did you mean: 
Vijay_chen
6 - Interface Innovator
6 - Interface Innovator

Why isn’t this 0? What is it. Look at the picture for details
image

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

It’s a known floating point issue. You can only see a set number of decimal places, but under the hood, Airtable is calculating more decimal places.

If you want it to be exactly zero, (without the minus), ROUND() the numbers. Note that you will still see however many decimal places you specify in the formatting options.

See Solution in Thread

4 Replies 4

Looks like either a typing or formatting issue. Rollup fields return arrays by default, though that DHL field might also be returning a string.

Have you tried clicking the Formatting tab in the formula editor and setting the output to an integer?

Failing that, can you share the rollup formulas you’re subtracting? Wrapping both formulas in VALUE() calls can probably serve as a band-aid fix for this specific brand of type errors, but you should really look to fix the underlying mechanism. Trying to correct faulty formulas with more formulas is a recipe for developing bad habits and even worse-performing apps.

I have set the format, I also suspected that there is a very small decimal hidden here, but I save 8 decimal places, still can not find the problem. And all the other records that subtracted to zero were normal, just these two anomalies
3

kuovonne
18 - Pluto
18 - Pluto

It’s a known floating point issue. You can only see a set number of decimal places, but under the hood, Airtable is calculating more decimal places.

If you want it to be exactly zero, (without the minus), ROUND() the numbers. Note that you will still see however many decimal places you specify in the formatting options.

Yep, and it’s a long-standing issue in Airtable but we cannot blame Airtable; this is a common problem in many languages actually.