Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

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

Need help for number format

alt_tush
9 - Comet

Hi Team,

 

I need your help.

 

Can you please help me to format the number 0.999  (It is a fixed decimal)   to  .999 in string format?

 

Exaples

 

Number    ToString (Final result)

 

0.999        .999

12.248      12.248

0.123        .123

 

Thank you in advance.

 

3 REPLIES 3
StephenR
Alteryx
Alteryx

I would use the Trim function in addition to the ToString function to trim the unwanted zero.

 

Capture.PNG

 

 

Regards,
Stephen Ruhl
Principal Customer Support Engineer

alt_tush
9 - Comet

Thank you for your help.

 

But if I use trim(ToString([Field1],4),"0") formula it convert my 0.9900 value into .99.

I need whole four digit after decimal places.

I.e if my value is 0.9900 then my result value is .9900 not .99.

 

Thank you once again.

 

 

 

StephenR
Alteryx
Alteryx

In that case, use TrimLeft().

Regards,
Stephen Ruhl
Principal Customer Support Engineer

Labels
Top Solution Authors