Alteryx Designer Desktop Discussions

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

Multiple column data conditions

yeruvab
6 - Meteoroid

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
6 - Meteoroid

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
6 - Meteoroid

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

Labels