Hello All, I have the inputs in column 1 to column 13. I would like alteryx to search for the column which has got the data and if the data is same in more than one column then copy only one data and paste it in the result column. can anyone please help, I am new to alteryx. Thanks in advance
Solved! Go to Solution.
Not the most efficient solution but you can do this at the row level with a formula tool and conditional statement:
IF !isempty([1]) then [1]
ELSEIF !isempty([2]) then [2]
ELSEIF !isempty([3]) then [3]
ELSEIF !isempty([4]) then [4]
ELSEIF !isempty([5]) then [5]
ELSEIF !isempty([6]) then [6]
ELSEIF !isempty([7]) then [7]
ELSEIF !isempty([8]) then [8]
ELSEIF !isempty([9]) then [9]
ELSEIF !isempty([10]) then [10]
ELSEIF !isempty([11]) then [11]
ELSEIF !isempty([12]) then [12]
ELSEIF !isempty([13]) then [13]
ELSE NULL() ENDIF
Effectively If the column is not empty then use the value otherwise check the next column along.
I have added a second file that does it slightly more dynamically finding the longest string in a given row and making that the result. Assuming the ones you dont want are always empty cells this should work
@VK11
We can go with a bit dynamic way.
I typically will do a Transpose when processing multiple columns data.
I do question that the result for Row#5 shall be null since "E" only appears once.
My solution also consider the case that more than one "Character" is appearing moret than twice.
You need last item from each Row
So you can try this logic
https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Last-Column-Value/td-p/1112228
Thank you so much ed_hayter it works now
Thanks for the clarification, even if it appears once, I would like to have E in the result. Would It work when I change the Value>=1?
@VK11
Yes, I think it will work.
If you still want the value even if it appears only once, then we can use an Unique Function to be simplier.