Start Free Trial

Alteryx Designer Desktop Discussions

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

Remove specific attributes from the string of data and rearrange to new output

quinburton1
5 - Atom

Hello, I am very much in need of assistance. I am struggling to find a solution to the following problem:

 

Raw Name Cleaned Name - Objective
Smith, John JOHN SMITH
Doe,JR.,John JOHN DOE
Doe,III,JaneJANE DOE
Smith, David LDAVID SMITH
De Carolis,IV, MichaelMICHAEL DE CAROLIS
Doe Smith, JohnJOHN DOE SMITH
Donte-Smith,SR,Michael LMICHAEL DONTE-SMITH
Rodriguez,II,Hector MHECTOR RODRIGUEZ

 

I need to do the following:

1. Remove all "JR", "JR.","SR","SR.","II","III,"IV" 

2. Remove the middle initial from the names that have the initial

3. Place the first name in-front of the last name and concatenate 

3. Capitalize and Trim 

 

Any help will be greatly appreciated. I have been spinning my wheels trying to figure this one out. I can knock it out in excel but I know Alteryx should be able to automate this process. 

3 REPLIES 3
Luke_C
17 - Castor
17 - Castor

Hi @quinburton1 

 

How's something like this? It works for the sample provided but be sure to test it on a wider set. Names can be tricky and this is a common ask on the community.

 

  1. Split columns based on the comma
  2. Text functions to trim, uppercase, concatenate the names together. 
    1. If the suffix is present, there is logic to handle that (based on how many fields were parsed)
    2. There is logic to only take the first name (getword()) for records with middle initials.

Luke_C_0-1657665979195.png

 

 

binuacs
21 - Polaris

@quinburton1 Another way of doing this

binuacs_0-1657718547838.png

 

sparksun
11 - Bolide

I use Regex tool to sovle the problem

sparksun_0-1657765249068.png

 

Labels
Top Solution Authors