Hello Everyone,
Could you please help with my ELSEIF statement to make a new column in the data set. I believe that most of it is structured correctly; however, when I start to close out the statement with ENDIF my formula goes from a colorful to black.
Below is my IF condition:
1. IF SLA date is equal to today then "Amber"
2. IF SLA date is less than today then "Red"
3. IF SLA date is equal to today + 1 then "Green"
4. IF SLA date is greater than today +1 then "White"
Formula:
IF [SLA date] = datetimetoday() +1 THEN "GREEN"
ELSEIF [SLA date] = datetimetoday() THEN "AMBER"
ELSEIF [SLA date] < datetimetoday() THEN "RED"
ELSEIF [SLA date] > datetimetoday() +1 THEN "WHITE"
ENDIF
Thanks in advance!
Solved! Go to Solution.
You need a base clause - ie a vanilla ELSE statement. You should add a base value.
I would also use datetimeadd(datetimetoday(),1,'days') vs datetimetoday()+1 --- but that might be just my preference.
@Agi007
Same as comment from above with some sample.
Thank you Qiu and apathetichell