community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Community v19.9

The latest release includes several enhancements designed to improve your Community experience!

Learn More
SOLVED

Parse all records after n characters

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!

Inactive User
Not applicable

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

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.
Asteroid

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

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

 

 

Asteroid

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

Labels