Alteryx Designer Desktop Discussions

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

Adding Decimals to amounts

ElizabethT
5 - Atom

My data set is coming as 

54834

-32509

1

 

And I need it to read

548.34

-325.09

1.00

 

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus
That last one is odd.

[amount]/100

Is a formula that would work. You can make it conditional. If the only values not to divide by a hundred are those less than a hundred or other rule.

IIF([amount]>100,[amount]/100,[amount])

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
CharlieS
17 - Castor
17 - Castor

Here's an expression that can be used in a Formula tool to string-edit the input to achieve the desired result as a string:

 

Left(PadRight(tostring([Input]),3,'0'),
Length(PadRight(tostring([Input]),3,'0'))-2)
+"."+
Right(PadRight(tostring([Input]),3,'0'),2)

 

If you'd like to output this as a Fixed Decimal field, the attached example shows how you can add a "tonumber(' function and format the field accordingly. 

ElizabethT
5 - Atom

That worked perfectly!

 

Thanks so much!

Labels