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

Alteryx Designer Desktop Discussions

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

Renaming data

Chelseaa
7 - Meteor

Hi all! i need help in renaming the data. It might be possible to do this using the LEFT or RIGHT tool? But i havent been successful with it, please advise!

 

Name
A1234 - Group APAC Team Finance
A2314 - Group APAC Team Human Resources
A4235 - Group EUROPE Management
A8237 - Group AMERICA Team Marketing
A8372 - Group AMERICA Business

 

Desired outcome:

NameDesired name
A1234 - Group APAC Team FinanceGroup APAC Team Finance (A1234)
A2314 - Group APAC Team Human ResourcesGroup APAC Team Human Resources (A2314)
A4235 - Group EUROPE ManagementGroup EUROPE Management (A4235)
A8237 - Group AMERICA Team MarketingGroup AMERICA Team Marketing (A8237)
A8372 - Group AMERICA BusinessGroup AMERICA Business (A8372)

 

Thank you all!

8 REPLIES 8
Qiu
21 - Polaris
21 - Polaris

@Chelseaa 
Hope this is what you need.

1119-Chelseaa.PNG

anjaliaithal
7 - Meteor

hi Chelseaa,

 

I feel it is more of data transformation than joining. Please see if this helps

Chelseaa
7 - Meteor

@Qiu 

Thank you once again!! it works 🙂

HomesickSurfer
12 - Quasar

Hi @Chelseaa 

 

One formula, one tool solution:  

 

REGEX_Replace([Name], GetWord([Name], 0)+' '+GetWord([Name], 1)+' ', "")+' '+'('+GetWord([Name], 0)+')'

 

Results:

 

Group APAC Team Finance (A1234)
Group APAC Team Human Resources (A2314)
Group EUROPE Management (A4235)
Group AMERICA Team Marketing (A8237)
Group AMERICA Business (A8372)

Qiu
21 - Polaris
21 - Polaris

@Chelseaa 
You are welcome.

And thank you for the accept mark also.

HomesickSurfer
12 - Quasar

Hi @Chelseaa 

 

Does this work for you?

 

@Qiu @Do you see any challenges using my formula, opposed to the solution you offer?  Please advise.  Thank you

Qiu
21 - Polaris
21 - Polaris

@HomesickSurfer 
Thank you for asking, jut give my comments.

1. RegEx is not friendly for beginners in this case

2. Even it is RegEx, I simple replace it with Replace, and it works also

3. It is very elegant solution, and I like it.

Qiu_0-1605827492950.png

 

HomesickSurfer
12 - Quasar

Thank you @Qiu 

Labels