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
20 - Arcturus
20 - Arcturus

@SH_94 
We can use PadLeft function.

0318_SH94.PNG

apathetichell
18 - Pollux

@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
20 - Arcturus
20 - Arcturus

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

Labels