Alteryx Designer Desktop Discussions

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

Trim 1st 2 digits in data set?

kvoelker
7 - Meteor

I have a column of data where I need to remove the 1st 2 digits & keep the rest. The whole string contains both letters and numbers. For example, in my column I have 07M123456789 & 780001234RB, etc... and I need to return M123456789 & 0001234RB. 

 

I've tried trim, trimright, & trimleft but these are not working because the length of my data varies. Any suggestions or help would be greatly 

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus
From my iPhone, please try:

Substring([field],2,)

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Kenda
16 - Nebula
16 - Nebula

Hi @kvoelker 

 

I bet you were so close when you were using those formulas. Here is what I would suggest:

right([Field1],Length([Field1])-2)

 

This says keep the right portion of your string with a length of your original string minus two characters.

 

Hope this helps! 

jamielaird
14 - Magnetar

@Kenda I appreciate and respect your diligence in using the actual string length. I have a habit of over or under trimming by 1 so I end up doing lazy stuff like this more often than I'd care to admit:

 

Trim(SubString([Field1],2,999))

 

kvoelker
7 - Meteor

Hi @MarqueeCrew  & @Kenda ,

 

Thank you so much for the suggestions. Both worked equally well!

 

Labels