Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Formatting Data - getting 50 to read 050

nwatzlaf
8 - Asteroid

Good morning,

 

I am trying to get zip codes in the same format (all having 3 digits). I am able to get 005, and 500 but not 050.

 

Here is the formula I used to get the 005 using the input column value of 5...

 

IF ZIPlen ="1" THEN PadLeft([CleanZIP3],3, "0") ELSE [CleanZIP3] ENDIF --> new column with value 005

 

I tried replicating the formula if the ZIPlen (string length is 2) but it does not work and changes the values of the zips with string length 1 that I calculated above.

 

Any help would be greatly appreciated!

 

Thank you for your time,

Natalia

2 REPLIES 2
JReid
9 - Comet

If you use the formula PadLeft([CleanZIP3],3,"0") Then it should leave 500 alone, make 50 into 050 and 5 into 005.

nwatzlaf
8 - Asteroid

Thank you @JReid !!

Labels