Hi I am having issues with a formula
IF [Key Account]="1" THEN "Key Account"
ELSEIF [Key Account]="0" THEN "Not Key Account"
Can you please advise what I am not doing correctly?
thanks,
Deirdre
Hey @u211968, this error indicates that you've got another empty expression somewhere like so:
As a side: the formula in your post above won't work if they're the only 2 outcomes you want to deal with. You'd need something like the following instead:
IF [Key Account]="1" THEN "Key Account"
ELSE "Not Key Account"
ENDIF
(Assuming your [Key Account] field is a string and not numeric - if it is numeric you'll need to remove the quotes around the 1).
Just to Add to the solution provided by DataNath the expression ELSEIF is not accepted by Alteryx I believe they call it an IF THEN ELSE statement on Alteryx. Hopefully this little titbit of information may help you going forward in your Alteyrx Journey :)
Hey @Deano478, ELSEIF is available to use in Alteryx, for IF statements that require more than 2 outputs i.e. a straightforward IF A THEN ... ELSE ...
Here's an example, where we want to provide a flag for either A or E and then deal with anything else in another way - the ELSEIF essentially 'restarts' the IF statement for a new check and we can use as many of these as we want in between the original IF and the final ELSE: