I can't seem to figure out what is wrong with this embedded if then statement and what seems to be wrong near the end.
Solved! Go to Solution.
The error is because you are trying to apply Integer/Number operations on a string. For eg [Days Until Due]<"8" applies a integer operation(<) on a string("8").
If you change the datatype of the fields, the below formula should work.
Please find attached a sample workflow.
Do let me know if this helps.
Best,
Jagdeesh
I think with ALTERYX the THEN/IF combo doesn't really work. Use something like this instead:
IF THEN ELSEIF THEN ELSEIF THEN ELSEIF THEN ELSE ENDIF
I do not think you can place an ENDIF in a statement prior to close either - so I'd try:
if [CC]=0 then "none completed" elseif [days until due]< 8 then "due within one week" elseif [days until due]>8 then "more then 1 week" else "past due" endif.
Keep in mind that you have string comparisons set up for numeric operators so in a string system your formula might not produce an error but it would create a mistake - ie. the string of "11" is less than "8" so it would produce "Due Within 1 Week," instead of "Past Due" you can intermingle numeric/string operators by using TONUMBER/TOSTRING.
Hope that helps!
I took out the Completed Count and simplified the formula, but it is now giving me an error or a malformed statement. The "Days Due" field is a number.
What is the data type of [Past Due Status]? If it's not a string, that's your problem. The result if each part of the IF statement needs to be the same data type.
try ELSEIF as one word too.. If that doesn't work - I'm sure someone here can help if you include a sample of your data.
It works now! THANK YOU!