In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

If or formula not working

Usamah22
8 - Asteroid

I have the below if formula but it is giving an error about a malformed if statement. can't see anything wrong with it?

 

if [E Flag]="Yes" then "E Customer"
else if [M Portal]="Yes" then "M Customer"
else if [A Flag]="Yes" then "A Customer"
else if [C Customer]="Yes" then "C Customer"
else if ([Current Price]="d11" or [Current Price]="Urgent") then "D"
else "Other" endif

3 REPLIES 3
Qiu
21 - Polaris
21 - Polaris

@Usamah22 

Missing 4 endif.😁

1210-Usamah22.PNG

Kenda
16 - Nebula
16 - Nebula

Hey there @Usamah22 

 

Try getting rid of the space between all of your "else if" bits (i.e. change them all to elseif).

Emil_Kos
17 - Castor
17 - Castor

Hi @Usamah22,

 

I believe you need to do small amendment:

 

if [E Flag]="Yes" then "E Customer"
elseif [M Portal]="Yes" then "M Customer"
elseif [A Flag]="Yes" then "A Customer"
elseif [C Customer]="Yes" then "C Customer"
elseif ([Current Price]="d11" or [Current Price]="Urgent") then "D"
else "Other" endif

 

I have aded a workflow for you as well.

Please mark my post as a solution if it was helpful!

Labels
Top Solution Authors