Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

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
20 - Arcturus
20 - Arcturus

@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