ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. 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

Making the number length become 6

SH_94
11 - Bolide

Dear community,

 

I would like to ask how can we make the number below to become standardised format - 6 length for all the number by adding zero in front of the number 

 

Input

1. 99995

2.8888

3.666

4.173633

5.29

 

Desired Output

1.099995

2.008888

3.000666

4.173633

5.000029

 

Many thanks for the help

4 REPLIES 4
Qiu
21 - Polaris
21 - Polaris

@SH_94 
We can use PadLeft function.

0318_SH94.PNG

apathetichell
20 - Arcturus

@Qiu  - no Regex?

 

regex_replace(tostring([field1]),"(\d)\.(\d+)","$1",0)+"."+padleft(regex_replace(tostring([Field1]),"(\d)\.(\d+)","$2",0),6,"0")

SH_94
11 - Bolide

Hi @apathetichell ,

 

May i know what tools u will be using for this formula to be work?

 

Thank you.

Qiu
21 - Polaris
21 - Polaris

@SH_94 
This is for the Formula Tool.
@apathetichell 
Parse or not parse, that is the question. 😂

Labels
Top Solution Authors