The result of the calculation looks like a number but creates an error if you use it in subsequent formulas

IF({Pricing (How Sold?)}=“By SqFt”,{Takeoff SqFt From Installation}+{Overage Amt},"")

Pricing (How Sold?) Is a single select field.
Takeoff SqFt is a # field looked up from a different table
Overage Amt is a formula that multiplies the Takeoff SqFt by a % to get a number.

I get the following when I try to format the output:
“Your result type is not a number or a date. Formatting options are currently only available if your result type is a number or a date.”

The result of the calculation looks like a number but creates an error if you use it in subsequent formulas.

Any help would be appreciated

The problem is coming from the ending empty string in your formula. If you want to return nothing if the condition portion of the IF() function returns false, you can omit that third argument and it will automatically return nothing. However, by including that empty string, you’ve effectively told Airtable that you want the formula to always return a string (a formula can only return a single type of data, and this is how Airtable enforces that rule), so it takes your calculation and turns it into a string. By omitting the empty string argument at the end, your calculation will return a number when the condition is true, and leave the field empty otherwise.

1 Like

As a side note, you can always tell whether a field contains a string vs a number by the justification. Numbers are always right-justified (so that decimals line up properly if present), strings are always left-justified.

Thank you, really helpful

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.