Free Trial

Alteryx Designer Desktop Discussions

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

IF ELSE - Multiple conditions

sriniprad08
11 - Bolide

Hi Team,

Hope you are well I need help.

I am trying to create a new column based on the single column with multiple categories.

Not sure what ia m missing.

Please find attached the workflow and output.

its giving error for zzTrade. I have a condtions like below please

 

Thanks

 

IF [Instrument]= "('zzAdvance' or 'zzTrade' or 'zzCollect' or 'zzProject Financing')"
THEN "CTTS"
ELSEIF "('xlcAdvance' or 'xlcTrade')" THEN "cxl"

ELSE "Error"

ENDIF

 

sriniprad08_0-1678791435483.png

 

2 REPLIES 2
binuacs
21 - Polaris

@sriniprad08 If you use the OR statement you should also mention the field name , which was missing in your if statement

 

IF [Instrument] = "zzAdvance" OR [Instrument] = "zzTrade" Then "CTTS"
ELSE "ERROR"
ENDIF

 

try the below formula

 

 

IF [Instrument] IN('zzAdvance' , 'zzTrade' , 'zzCollect' , 'zzProject Financing')
THEN "CTTS"
ELSEIF [Instrument] IN ('xlcAdvance' , 'xlcTrade') THEN "cxl"

ELSE "Error"

ENDIF

 

sriniprad08
11 - Bolide

Hi @binuacs ,

 

Thank you so much. Really appreciate that. 

I have requested another query on the problem "parsing into multiple lines using new line character" which you helped with. 

Can you please let me know thanks,

Sri

Labels
Top Solution Authors