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.

Removing duplicate and text to row or column.

JingYih_Herbalife
8 - Asteroid

I have the following information all in one column. 

 

(15)King, Shobieng (Shobieng King) > (14)Vuan, Thang (Thang Vuan) > (13)Huynh, Vango (Vango Huynh) > (12)Hong, Anh (Anh Hong) > (11)Doping, Thoat (Thoat Doping) > (6)Huynh, Vango (Vango Huynh) > (5)Maitran, Nguyen (Nguyen Maitran) > (4)Doping, Thoat (Thoat Doping)

 

1st, I want to remove everything that is in a bracket and the symbol >

2nd, there are duplicate names such as Huynh, Vango & Doping, Thoat. 

 

I would like to view the result in one column such as below;

King, Shobieng
Vuan, Thang
Huynh, Vango
Hong, Anh
Doping, Thoat
Maitran, Nguyen

 

Can I do this using text-to-column or do I have to use RegEx?

 

Thanks in advance.

7 REPLIES 7
Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @JingYih_Herbalife ,

 

One way of doing this would be to use TextToColumns tool and RegEx_Replace function.

I hope this helps.

 

Workflow

RegExParse_1.png

Output

RegExParse_2.png

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Sorry, I forgot to add Unique tool.

RegExParse_1.png

RegExParse_2.png

JingYih_Herbalife
8 - Asteroid

Hi @Yoshiro_Fujimori , any solution if I want to do it by having the results all in one row and multiple columns?

 

Thanks in advance. 

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

@JingYih_Herbalife ,

 

You may want to use Cross Tab after Record ID tool.

 

Workflow

RegExParse_1.png

Output

RegExParse_2.png

flying008
15 - Aurora
JingYih_Herbalife
8 - Asteroid

Hi @Yoshiro_Fujimori 

 

For the RegEx replace formula, can you help with the formula to extract the name in the bracket instead?

 

Thanks in advance. 

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Here you go.

 

REGEX_Replace([Data], "\(.*\).*\((.*)\)", "$1")

 

You may want to check this site to test your RegEx.

https://regex101.com/

 

Goog luck.

Labels
Top Solution Authors