Alteryx Designer Desktop Discussions

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

Multiple fields with duplicates in each field

htalteryx
8 - Asteroid

I have 10+ different fields.  Each field has multiple duplicates separated by a semicolon in the cell.  How do I remove the duplicates in all fields using the fewest tools possible?  Thank you!

8 REPLIES 8
PanPP
Alteryx Alumni (Retired)

Hi @htalteryx 

 

You can remove the duplicates using a Unique tool. Select the proper fields in the Unique tool that contains the duplicates. 

 

https://help.alteryx.com/20223/designer/unique-tool

 

 

flying008
14 - Magnetar

Hi, @htalteryx 

 

Could you please give a sample data for demo of input and output.

gautiergodard
13 - Pulsar

Hey @htalteryx 

Here is how i would do it, using a simple example based on what you explained.

gautiergodard_0-1672972664090.png

 

htalteryx
8 - Asteroid

Please see attached example.  If possible, use a formula tool to remove duplicates.  I think it involves using regex replace, but not sure.

Qiu
20 - Arcturus
20 - Arcturus

@htalteryx 
I dont see how I can use the Formula tool here.

You mentioned that have multiple columns containing duplicated data so typically we can use a Transpose tool to bring the column data to one column.

Then do a parse with your specified delimeter, in your sample data, we assum it is , and ;.

After that, we can then use a Unique tool and bring the data data back to original form with Cross Tab.

0106-htalteryx.PNG

grazitti_sapna
17 - Castor

@htalteryx , Here is another way to do this with 4 tools if you have Primary key already in your data.

 

grazitti_sapna_1-1672982933148.png

 

Sapna Gupta
htalteryx
8 - Asteroid

Hi All,

I figured out how to do it with one formula tool:

 

REGEX_Replace([Manager], '(\b[^;]+)(?=.*; *\1(?:;|$)); *', '')

 

Thanks anyways!

muhammadimranhakimi
6 - Meteoroid

Thanks for the discussion!

Labels