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. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. 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

show number in fixed length format

JokeFun
8 - Asteroid

Hi,

 

I have a list of numbers, from 0 to 999. I need to have them all shown as text format with length at 3. So 0 will be 000, 1 will be 001, 90 will be 090 etc.

 

I used a formula tool for this purpose, which works. But I think there should be another simpler function, just like in excel we can have text([Field1], "000").

 

if length([Field1])=1 then "00"+[Field1]
elseif length([Field1])=2 then "0" + [Field1]
else [Field1]
endif

 

Thanks,

 

2 REPLIES 2
ponraj
13 - Pulsar

Here is the sample workflow. Hope this is helpful. 

Capture.PNG

JokeFun
8 - Asteroid

@ponraj Hi Thanks, this is great! Learnt a new trick today.

Labels
Top Solution Authors