In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to Add leading Zeros to a column which has String Value

Ram_RK
8 - Asteroid

How to add leading Zeros to a column which has 6 digit number 

 

like "123456"  I need to make it as "0000000123456"  - I need to make this number as 13 digit number entire Row

 

Numbers in the column like 

123456 

654321

1111111

2345

112

 

Wanted to convert like below all the values in the particular column 

0000000123456

0000000654321

0000000111111

0000000002345

0000000000112

2 REPLIES 2
ShankerV
17 - Castor

Hi @Ram_RK 

 

Please use the function Padleft() to get the desired output.

 

Step 1: Formula tool

PadLeft(ToString([Column A]),13,'0')

 

Many thanks

Shanker V

Ram_RK
8 - Asteroid

Thanks Shankar I got that 

 

I applied this formulae as it contains Text also and the formulae should Avoid text 

 

 

In formulae Tool >>>>>> 

 

if IsInteger([Value]) then
PadLeft([Value], 13, '0')
else
[Value]
endif

Labels
Top Solution Authors