We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Cleaning a column in alteryx

NadaH
6 - Meteoroid

Hello everyone,

I have an issue trying to clean the a column on my workflow.

 

I got this table and would like to clean column A by removing the occurrences

ABC
hi,hi,hi,hi,hello145
ab,ab,an,an254
de,bon,bon332

 

I should have this result:

 

ABC
hi,hello145
ab,an254
de,bon332

 

Thank you in advance for your help

10 REPLIES 10
atcodedog05
22 - Nova
22 - Nova

Hi @NadaH 

 

In the below formula

 

REGEX_Replace([A]+",", "([^,]+,)\1+", "$1")

 

([^,+]) - represents series of character with no commas in between. Which constitutes a value like supply - sav

\1+ - represents same above word repeated more than once

 

If value is repeated replace it only with single occurence.

 

Regex is something takes practice to get good at 😅

 

Here is a resource which might help https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

 

Hope this helps : )

Labels
Top Solution Authors