Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!
SOLVED

Parse all records after n characters

Highlighted
8 - Asteroid

Hi,

 

I have a list of codes that contain three letters followed by several numbers (numbers can vary). Here is a sample:

 

VWN29747

BSA1927330

GST38559

MBU113445

 

I want to remove all letters and just keep the three letters in the front. I have attempted to use the Text to Columns tool and the Formula tool with something like this:  

Left([Dealer Code], Length([Dealer Code]) -3)

 

I also tried to wrap my head around RegEx, but I am not quite getting it yet. Any suggestions are greatly appreciated!

Highlighted
Inactive User
Not applicable

Formula tool, select the Dealer Code field and enter the formula: LEFT([Dealer Code],3)

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Letters:

Left([code],3)

 

Numbers:

substring([code],3)

 

cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
8 - Asteroid

I knew it had to be something that simple. 🙂   Thank you so much!

Highlighted
12 - Quasar

Just to chime in with an alternate solution... I use the Cleanse tool a lot.

 

There is a "Remove Unwanted Characters" section that includes options for removing Letters, Numbers, Punctuation etc.

 

Capture.PNG

 

 

Highlighted
8 - Asteroid

I like this approach as well. Thank  you!!!

Labels