community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

How to Retain Values in One Row and Remove The Duplicates in Other Rows

I have data looks like this:

 

1s-lightscasualsbungee-shoescasualshook-and-loop-shoescasualslight-up-shoessneakersbungee-shoessneakershook-and-loop-shoes
2usa-casualscasualscomfort-shoesdress-casualsloafersdress-casualsslip-on-shoes    
3s-lightscasualslace-up-shoescasualslight-up-shoessneakerslace-up-shoes    

 

For each row, I would like to compare the data across columns. If there are duplicates in later columns, I would like to keep the first value and then remove other duplicates in the later columns. The highlighted values mean there are duplicates in each row but different columns. The yellow highlighted values are the ones to keep, and the red highlighted values are the ones to remove.

 

The expected result should look like:

 

1s-lightscasualsbungee-shoes hook-and-loop-shoes light-up-shoessneakers   
2usa-casualscasualscomfort-shoesdress-casualsloafers slip-on-shoes    
3s-lightscasualslace-up-shoes light-up-shoessneakers     

 

I really appreciate if someone can show me how to do this type of cleanup in Alteryx!

Asteroid

Are you trying to retain the column order and the blank fields? I think a transpose, unique, and a crosstab tool should do the trick.

 

Capture.JPG

Highlighted

Hi @acastelazo preferably retain the column order, and I can lose the blank fields. I think it would work for me even if the column order is different.

Thank you for your guidance! This solution works :)

Labels