Apr 15, 2022 02:29 AM
Apr 15, 2022 06:22 AM
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.
Apr 15, 2022 03:10 AM
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.
Apr 15, 2022 03:18 AM
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
Apr 15, 2022 06:22 AM
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.
Apr 16, 2022 10:52 AM
Yep, and it’s a long-standing issue in Airtable but we cannot blame Airtable; this is a common problem in many languages actually.