Alteryx Designer Desktop Discussions

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

Need Assistance with Formula for Desired Output

jstout
5 - Atom

Hello Community,

 

I am trying to get an desired output in the formula tool for a number dataset. I need all numbers to be 12 characters with leading and trailing zeros behind the decimal point. I have been able to get the leading zeros fine with padleft with the the trailing zeros after the decimal point and the "0" amount that is causing the issue for me.

 

Here are some examples.

 

Current Values

1541.71

663.3

0

 

Expected Output

000001541.71

000000663.30

000000000.00

 

 

Thank You in Advance

4 REPLIES 4
ShankerV
17 - Castor

Hi @jstout 

 

One way of doing this.

 

ShankerV_0-1683639876368.png

IF Length([F1])<2
THEN "000000000.00"
ELSE [F1]
ENDIF

 

ShankerV_1-1683639954364.png

 

 

Input used is below as you have already cracked the other's except 0.

ShankerV_0-1683639930700.png

 

Many thanks

Shanker V

RobertOdera
13 - Pulsar

Hi, @jstout 

 

Consider the below - I hope you find it helpful. Cheers!

 

RobertOdera_0-1683644640387.png

 

jstout
5 - Atom

Thank You @RobertOdera . This worked great for me.

RobertOdera
13 - Pulsar

@You are most welcome @jstout!

Labels