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

Replacing NaN with Blank (purely for visual purposes)

Topic Labels: Formulas
900 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi everyone,

I have a “Days Remaining” formula in a Project Management Task View, and the formula looks like this: DATETIME_DIFF({Due Date}, TODAY(), ‘days’)…

Naturally, if the “Due Date” cell is empty, the “Days Remaining” cell shows “NaN”…

Is there anything I can add into the formula to make the “NaN” disappear, in other words, be replaced with a Blank cell? It’s purely for visual purposes…

I’ve tried to add “BLANK()” into the formula, but that didn’t seem to change it so I must be doing it wrong. DATETIME_DIFF({Due Date}, TODAY(), ‘days’, BLANK())…

Thanks,
Christopher

2 Replies 2

Wrap the formula in an IF function and omit the third argument (the ‘else’ part).

IF( {Due Date},
  DATETIME_DIFF({Due Date}, TODAY(), 'days')
)

Amazing. Thank you, @kuovonne