current data:
Column 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |
444 | |||||
444 | 333 | ||||
444 | 333 | 555 | |||
444 | 333 | 555 | 222 | ||
444 | 333 | 555 | 222 | 111 |
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 1 | Column 2 | Column 3 | Column 4 | Column 5 | Column 6 |
444 | |||||
333 | |||||
555 | |||||
222 | |||||
111 |
if,,,
elseif...
elseif...
endif
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 1 | column 2 | column 3 | column 4 | column 5 | column 6 | column 7 |
aaa | dd | ff | ||||
aaa | cc | ff | ||||
aaa | cc | bb | aa | ff |
what i need:
column 1 | column 2 | column 3 | column 4 | column 5 | column 6 | column 7 |
aaa | dd | dd | ff | |||
aaa | cc | cc | ff | |||
aaa | cc | bb | aa | ff |
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