Free Trial

Alteryx Designer Desktop Discussions

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

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

ivanc0910
5 - Atom

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!

3 REPLIES 3
acastelazo
8 - 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

ivanc0910
5 - Atom

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.

ivanc0910
5 - Atom

Thank you for your guidance! This solution works :)

Labels
Top Solution Authors