Hi!
I just started school about 2 weeks ago and we are learning Alteryx. I need to create a field with these rules:
- shipments arriving within 6 days of the expected date are flagged "On Time"
- shipments arriving within 20 days of the expected date are flagged "Late"
- shipments arriving over 20 days after the expected date are flagged "Significant Delay"
I was able to use the Formula tool to calculate the number of days but I can't get the rules to work, can someone help me please?
Thank you!
Solved! Go to Solution.
hi @scsmith107
Conditional IF statements would help like this.
IF [Days]>20 THEN "Significant Delay"
ELSEIF [Days]>6 THEN "Late"
ELSE "On Time"
ENDIF
Hi, @scsmith107
FYI.
If [date] > 20
Then 'Significant Delay'
Elseif [date] > 6
Then 'Late'
Else 'On Time'
Endif
I entered the formula but changed days to number of days but I get an error message saying invalid operator >.
@scsmith107 Please be sure of field type of"number of days" are Integer(INT16,INT32,INT64 etc). Default field type of Formula is String, so if it is String field, it does not work.
Thank you so much!