I've the below conditional formula using other variables and its been fine. The only thing I've changed are the conditions. Can anyone help me find what's wrong. The error coming up is 'ENDIF' causes the formula to be a malformed IF statement
IF [TAT from confirmed quote to notification of payment/policy collection]<=3 AND [TAT from confirmed quote to notification of payment/policy collection]>=1 THEN "1-3 days" ELSEIF [TAT from confirmed quote to notification of payment/policy collection]<=7 AND [TAT from confirmed quote to notification of payment/policy collection]>=4 THEN "4-7 days" ENDIF
Solved! Go to Solution.
Hi @kpoghon
As per the syntax of NESTED IF,
ELSE is missing.
IF condition
ELSEIF condition
ELSE
ENDIF
Many thanks
Shanker V
Hi @kpoghon
You can try the below.
IF [TAT from confirmed quote to notification of payment/policy collection]<=3 AND [TAT from confirmed quote to notification of payment/policy collection]>=1
THEN "1-3 days"
ELSEIF [TAT from confirmed quote to notification of payment/policy collection]<=7 AND [TAT from confirmed quote to notification of payment/policy collection]>=4
THEN "4-7 days"
ELSE null()
ENDIF
or
IF [TAT from confirmed quote to notification of payment/policy collection]<=3 AND [TAT from confirmed quote to notification of payment/policy collection]>=1
THEN "1-3 days"
ELSEIF [TAT from confirmed quote to notification of payment/policy collection]<=7 AND [TAT from confirmed quote to notification of payment/policy collection]>=4
THEN "4-7 days"
ELSE ""
ENDIF
Many thanks
Shanker V
Add ELSE condition before ENDIF
Hi @kpoghon , an 'Invalid Operator' error happens due to an incorrect data type. Because you are using a '<=' operator, Alteryx is expecting your field to be a number, and when it isn't it causes an error.
To fix this, put a select tool before your formula and change the data type of your [TAT from confirmed quote...] field to a Double.
Hope this helps!
@kpoghon This also might happen if you're trying to update your [TAT...] field with the formula tool. Instead of updating the current field, try making a new field instead.
Thank you so much! This solved it!