Skip to main content

Hey everyone,


I’m trying to add a field that will return either a calculation or text based on whether another cell is empty or not.

I have a working formula for the difference between two dates, but I want to put that inside an IF formula that will return the value of the difference in days if the field is populated or a text “Not Yet Resolved” if the field is empty.


Here’s what I have at the moment:


IF({Resolved} != BLANK() , VALUE(DATETIME_DIFF(Resolved, Created, ‘days’)) , “Not Yet Resolved”)


But it is returning an error.

Can somebody provide a solution?


Thanks

Hello Alex

I think it’s because of the VALUE function, because DATETIME_DIFF should return a number and not a text string, which is the correct input for the VALUE function. Try removing it:

IF({Resolved} != BLANK() , DATETIME_DIFF(Resolved, Created, ‘days’) , “Not Yet Resolved”)


Hello Alex

I think it’s because of the VALUE function, because DATETIME_DIFF should return a number and not a text string, which is the correct input for the VALUE function. Try removing it:

IF({Resolved} != BLANK() , DATETIME_DIFF(Resolved, Created, ‘days’) , “Not Yet Resolved”)


Thanks for the reply!

Airtable is telling me that its an invalid formula though.

Any other suggestions?


Reply