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.

Multiple column data conditions

yeruvab
7 - Meteor

Hello Alteryx community!

 

I have a scenario where I have to check all the conditions in multiple columns and add value based on those columns data, if then else statement is checking first condition and if its true its not going to check the next condition. Below is the formula I used. Attached the end result in the output column. Appreciate any light on this question please. Thanks!

 

if isnull([UM]) and not isnull([PA]) then "(" + [PA] + " " +"PA" + ")" elseif
isnull( [UM]) and not isnull([ST]) then "(" + [ST] + " " +"ST" + ")" elseif
isnull( [UM]) and not isnull([QL]) then "(" + [QL] + " " +"QL" + ")" elseif
NOT IsNull([PA]) then "("+ [PA] + " " + Substring([UM],1) elseif
NOT IsNull([ST]) then "("+ [ST] + " " + Substring([UM],1) elseif
NOT IsNull([QL]) then "("+ [QL] + " " + Substring([UM],1) else [UM]
endif

3 REPLIES 3
Watermark
12 - Quasar
12 - Quasar

Your attachment didn't have anything in it except 2 input tools, and those both referenced spreadsheets you didn't include with the process file.  Also your question isn't quite clear. Are you having trouble with an If/Then/Elseif statement? 

yeruvab
7 - Meteor

Sorry about that, Yes I have multiple data checks on multiple columns and output  into new column based on the conditions, I'm using the below IF function but this is not giving the desired output, I have attached input and output data for reference, edited the question above.

 

yeruvab
7 - Meteor

Here is the snapshot of output column how it should be, not sure how to use the multi row or multi formula tools.

Labels
Top Solution Authors