We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula to trim some strings and not others

nwatzlaf
8 - Asteroid

Hi there,

 

I have a column of zip codes some are 3 digit and some are 4 and 5. I want to write a formula that if the zip is 4 or 5 digits to trim it to 3 digits (removing digits from the right hand side) and if the zip is 3 digits to keep it the same. I can't quite get the structure right on this.

 

Any help would be greatly appreciated!

 

Thank you for your time,

Natalia

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@nwatzlaf Would something like this work in a formula tool?

Left([Field],3)

 

nwatzlaf
8 - Asteroid

@patrick_digan Thank you!! Simple fix 🙂 

Labels
Top Solution Authors