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

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
We will be upgrading the Gallery to our 2019.4 release this Saturday, December 7th beginning at 9:00am MT. We expect the outage to take last approx. 2.5 hours.
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)

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