Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to Append the zeros to the existing column based on the length of the field value

prashanthansi
5 - Atom

Hi,

 

Below is my requirement:

The length for the field value in a column should be minimum 5 digits. Irrespective of the length of the string available in the field.

Example: if the field value is 1, then the Alteryx should populate the value as 00001. or 

If the 12, then the value should be 00012 or 

if it is 123, then the value should be 00123.

 

Any help,

Thanks

 

2 REPLIES 2
Emil_Kos
17 - Castor
17 - Castor

Hi @prashanthansi,

 

Please check this post I think it will give you all the answers you need!

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-do-I-pad-leading-Zeros/m-p/48669/h...

ChrisTX
16 - Nebula
16 - Nebula

Use the PadLeft function.  Here is a list of all String functions:  https://help.alteryx.com/current/designer/functions-quick-reference

 

If your field is numeric, you'll need to first convert it to string.

 

Chris

Labels
Top Solution Authors