Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Join us on Dec 2 for a half-day virtual analytics + data science event!
US & CA customers only

It's the most wonderful time of the year - Santalytics 2020 is here! This year, Santa's workshop needs the help of the Alteryx Community to help get back on track, so head over to the Group Hub for all the info to get started!

Converting number to string

5 - Atom

I want to convert a number field into a string field with decimals and comma formatting. I used the "tostring([Right_sum],1,2)" formula and I get an error


"Error: Formula (103): The formula "Right_Sum" resulted in a string but the field is numeric. Use ToNumber(...) if this is correct. (Expression #3)"


Is there a way to do this with a formula and not have to also use select tools?

7 - Meteor

Hey @spencerpoorman without seeing the workflow or a sample, I am thinking that the original field you're trying to convert is a number and that you're trying to apply the formula to the same field, which gives you an error (producing a string in a number field). My go-to fix for that is to have the conversion be a new column. Does that help?

Alteryx Certified Partner
Alteryx Certified Partner

Hi @spencerpoorman if you use that syntax in a existing field which is numeric you will get that error. If you create a new field in the formula tool and use that syntax and ensure you select a string field type for that new field then it will work fine.