Jul 27, 2018 06:26 PM
Hi There
I am trying to set up a formula to read from a single date field and provide an output text to give me three desired output. As below:
I understand I will need to use a Nested IF Formula to achieve this…however the problem is, I cannot seem to make even un-nested original formula work to get the first “30 days” result.
I have it working for the base formula :
IF({Conservative Date} <= TODAY(),“yes”,“no”)
(note - I have just used ‘yes’ and ‘no’ as a test as I progress through my knowledge)
However when I am getting errors where I try to make it today’s date + 30 days (instead of just today). I know this sounds simple and basic…but do I use the ‘+’ symbol? SUM() function? Everything I try does not work and just returns ‘Error’ message.
I have been trying things like:
IF({Conservative Date} <= (TODAY() + 30),“yes”,“no”)
Any suggestions would be great. Thank you in advance.
Robert
Jul 27, 2018 06:46 PM
Alright…just figured out there is a DATEADD function! :grinning:
Using this it seems to work:
IF({Conservative Date} <= DATEADD(TODAY(), 30, ‘days’),“30 days”,“nested”)
Can anyone give me advise on how to deal with the 60 days and 90 days in the nested marker above?
Jul 28, 2018 07:35 AM
Hi Robert,
Please check if this is what you intend to do:
Formula used for “Field 7” is this:
IF(DATETIME_DIFF({Conservative Date},DATEADD(TODAY(),30,‘days’),‘days’)<=0,“30 days”,
IF(DATETIME_DIFF({Conservative Date},DATEADD(TODAY(),60,‘days’),‘days’)<=0,“60 days”,“90 days”
)
)
Hope it helps
Rgds
Jul 28, 2018 07:37 AM
PS: Indented should look something like this:
Jul 28, 2018 09:40 AM
And this one also got the same results:
IF(DATETIME_DIFF({Conservative Date},TODAY(),‘days’)<=-30,“30 days”,
IF(DATETIME_DIFF({Conservative Date},TODAY(),‘days’)<=-60,“60 days”,“90 days”))
:smiling_face_with_sunglasses:
Jul 29, 2018 03:23 PM
Thanks Luiggi
Works perfect
You have taught me a great deal!