Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Why does Formulae calculate Minus Zero?

Topic Labels: Formulas
Solved
Jump to Solution
694 1
cancel
Showing results for 
Search instead for 
Did you mean: 

I used a simple formula for column C (it is A-B), it shows up as -0 in one case and 0 for another? Why should zero have a negative sign?

In my case although all 3 columns are setup to round to 2 digits, I am certain that there is no third decimal digit in either column A or B.

Reason for asking is that it messes my colour codes where I’ve setup anything less than zero as red.

1 Solution

Accepted Solutions

Even though you are rounding the display of A and B in their fields, Airtable still holds the full float in the background - down to the greatest level of specificity the float originally went to.

For better or for worse (probably for better), when you perform calculations via formulas on a number field that you have rounded in the display, the formula acts on the float behind the display, not the displayed/rounded version.

So, in your (A - B) formula, try rounding the end result of the calculation like this: ROUND(A - B).

If that still displays a negative 0, try rounding each number involved in the calculation like this: ROUND(A) - ROUND(B).

See Solution in Thread

1 Reply 1

Even though you are rounding the display of A and B in their fields, Airtable still holds the full float in the background - down to the greatest level of specificity the float originally went to.

For better or for worse (probably for better), when you perform calculations via formulas on a number field that you have rounded in the display, the formula acts on the float behind the display, not the displayed/rounded version.

So, in your (A - B) formula, try rounding the end result of the calculation like this: ROUND(A - B).

If that still displays a negative 0, try rounding each number involved in the calculation like this: ROUND(A) - ROUND(B).