Free Trial

Alteryx Designer Desktop Discussions

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

Remove a Specific Character at the End

KamenRider
11 - Bolide

Hi,

 

I would like to seek you help on how I am going to remove a specific letters at the end of an ID number. The specific letters are _R, _OT and _OTR. For example if I have 123456789_R, the results should be 123456789.

 

Attaching the data for your reference.

 

Thanks and looking forward for your assistance.

 

Kamen

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @KamenRider 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1646412548139.png

 

Hope this helps : )

 

binuacs
21 - Polaris

@KamenRider 

 

IIF(EndsWith([ID Number], '_R') OR EndsWith([ID Number], '_OT') OR EndsWith([ID Number], '_OTR'),REGEX_Replace([ID Number],'(.+)_(.+)', '$1'),[ID Number])

binuacs_0-1646413280402.png

 

KamenRider
11 - Bolide

Thank you guys @atcodedog05  and @binuacs, both solutions work.

 

Appreciate your response so much.

 

Kamen

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @KamenRider 

Cheers and have a nice day!

Labels
Top Solution Authors