Alteryx Designer Desktop Discussions

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

How top create a multirow formula to bring in value from left if column is blank?

gc961
5 - Atom

current data:

Column 1Column 2Column 3Column 4Column 5Column 6
444     
444 333   
444 333555  
444 333555222 
444 333555222111

 

how do i get my table to look like this? i want column 6 to have filled with data, but i want it to fill from one column to the left first, and then if that is empty, go one more to the left, and so forth until it is no longer blank.

 

Column 1Column 2Column 3Column 4Column 5Column 6
     444
     333
     555
     222
     111
5 REPLIES 5
hroderick
8 - Asteroid

if,,,

elseif...

elseif...

endif

pedrodrfaria
13 - Pulsar

Hi @gc961 

 

Please see attached for the workflow:

 

pedrodrfaria_0-1613095590129.png

 

 

Pedro.

 

gc961
5 - Atom

Hey @pedrodrfaria, thank you for providing that workflow, i seem to have a few issues with it, and it was my fault when explaining it. im sorry im still getting the hang of alteryx and still learning the nuances of the program.

the data in the columns is string, not integers, so when i do the cross tab i cant aggregate values by sum. also there are columns to the right with data in it, but i want the sixth column to be the one filled from things on the left. it should in fact be like this:

 

column 1column 2column 3column 4column 5column 6column 7
aaa dd   ff
aaa  cc  ff
aaa  ccbbaaff

 

what i need:

column 1column 2column 3column 4column 5column 6column 7
aaa dd  ddff
aaa  cc ccff
aaa  ccbbaaff

 

pedrodrfaria
13 - Pulsar

Hi @gc961 

 

Please find the updated version below:

pedrodrfaria_0-1613153503544.png

 

hroderick
8 - Asteroid

Presuming the highlighted aa below should be aaa

 

Use formula tool.

Calculate column 6

Formula is :

if !isempty([column 1]) then [column 1]

elseif !isempty([column 2]) then [column 2]

elseif !isempty([column 3]) then [column 3]

elseif !isempty([column 4]) then [column 4]

elseif !isempty([column 5]) then [column 5]

else "" endif 

 

hroderick_0-1613319339760.png

 

Labels