Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Adding Symbols around the last word in a string

RokasC
5 - Atom

Hi all!

 

I have a fairly complicated challenge which has me stumped. I have a column which gives the names of many chemicals as well as the region focus all in the same string. However, I need to bracket the location word. The issue comes from the multitude of chemical names so I don't think splitting this out with text to columns and then formula will work. The region is always at the end with no spaces (Even in the case of "Asia-Pacific").

 

Example of desired result:

 

Ethyl Acetate Europe   > Ethyl Acetate (Europe)

Gas Europe  > Gas (Europe)

Poly Asia-Pacifici    >  Poly (Asia-Pacific)

 

RokasC_0-1600270479505.png

 

Many thanks in advance!!

 

 

Rokas

 

3 REPLIES 3
vizAlter
12 - Quasar

@RokasC   — Hope attached the solution will be helpful, if not let me know.

 

 

1st you need a RegEx tool and use "Parse" Output Method:

 

(.*)(\s.+$)

 

vizAlter_0-1600271629445.png

Then

vizAlter_0-1600271716227.png

 

 

 

RokasC
5 - Atom

Worked Perfectly! Thank you so much

Amarendra
10 - Fireball

@RokasC You can do this using a the following formula

 

 '(' + ReverseString(GetWord(ReverseString([Chemical]),0)) + ')'

Labels