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.
解決済み

Tostring removing zeros

Bobbins
アステロイド

Morning All,

My data is 3 simple columns, a text field, a number field and a set decimal field

Bobbins_0-1672996651122.png

I want to create a 4th column where its the 3 columns joined together, IE:

 

"Smith 1.21 0.5000" 

 

However, when I use the following:

 

[Name] + " " + tostring([PPH]) + " " + ToString([Multipler])

 

It gives me this as the to string is deleting zeros:

Bobbins_1-1672996808264.png

How do I keep the zeros please?

Thank you

 

 

2件の返信2
DataNath
17 - Castor
17 - Castor

Hey @Bobbins, the second argument of the ToString() function is the numDec option, where you can define the number of decimal places in the output. Therefore, you could just set this to 4:

 

 

[Name] + " " + tostring([PPH]) + " " + ToString([Multiplier],4)

 

 

DataNath_0-1672997367239.png

Bobbins
アステロイド

@DataNath , bah missed that nuance, thank you kindly!

ラベル
トップのソリューション投稿者