Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Remove Duplicates in a single cell

siddharthpotlia
5 - Atom

Hi, I have data in the below format (In a single cell) Deutsche Boerse AG (DB); Deutsche Boerse AG (DB); Bolsa Mexicana de Valores (BMV); London Stock Exchange (LSE); Pink Sheets LLC (OTCPK); Pink Sheets LLC (OTCPK) I want to remove all duplicates in here Ideally the result shall look like: Deutsche Boerse AG (DB); Bolsa Mexicana de Valores (BMV); London Stock Exchange (LSE); Pink Sheets LLC (OTCPK) How do I do this in Alteryx, I know Regex is one way but I am not able to figure out the correct code for it. I found the a code shared in the community for this regex_replace([field],"\b(\w+),(?=.*\b\1,?)",""), but this is not working for me (Most likely the code has to be customized in line with the data but I do not know much about stack overflow at the moment, can anyone please help out in this. Thanks in advance.

12 REPLIES 12
atcodedog05
22 - Nova
22 - Nova

Hi @siddharthpotlia 

 

Both my methods should work one where i am splitting & joining using recordID and another using regex.

atcodedog05_0-1621951257406.png

 

You can check & let me know.

 

EDIT : @vlad_kutateladze this why i used i had used recordID tool 🙂 so that rows can split & join back to the same row.

 

vlad_kutateladze
8 - Asteroid

@atcodedog05  Yes, for multiple rows Record ID tool is necessary 👍

 
mceleavey
17 - Castor
17 - Castor

@vlad_kutateladze not exactly 🙂

 

You are provided with a Company ID, so this would be the record identifier. 

No Record ID needed.

 

M.



Bulien

Labels
Top Solution Authors