I am really new to Alteryx.
I am adding new field to give me "Created Last 30 Days", "Created Last 60 Days", "Created Last 90 Days", "90+Days" in one column based of the create date.
I am receiving a "Malformed If Statement" error for my formula below:
IF [OppCreateDate]=DateTimeToday()<=30
THEN "Created Last 30 Days"
ELSEIF [OppCreateDate]=DateTimeToday()<=60
THEN "Created Last 60 Days"
ELSEIF [OppCreateDate]=DateTimeToday()<=90
THEN "Created Last 90 Days"
ElseIF [OppCreateDate]=datetimetoday()>=90
THEN "90+ Days"
EndIF
What am I not seeing here?
Solved! Go to Solution.
@Sheena_dup_300 Welcome! I think 2 things need to change: 1) You should use the datetimediff function to compare dates. Something like
DateTimeDiff(OppCreateDate,DateTimeToday,"days")<=30
2) You'll need to have a final Else even if nothing could possibly go there. So after "90+ days" you could put Else "Unknown"