Alteryx Designer Desktop Discussions

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

How to add a Thousands Separator with ToString or other way?

StellaBon
11 - Bolide

Hello!

 

I am in the Adapt program and I pulled in my own data for the first time to play around with it. It has been going well and I am feeling good in general in my understanding of the core tools. Hooray!

 

BUT:

I ran into a problem trying to add a thousands separator to a field. I do not want decimals. This is how I configured it in Formula Tool: 

 

ToString([Steps per Month],0,1)

 

However I am not getting the thousands separator. I tried changing the data type and nothing seems to do it.

 

What am I doing wrong? Is there an alternative way to do this without turning my datatype to a string? Why would one have to convert a numeric datatype to a string in order to add a thousands separator, it seems odd. It's a little thing but it feels like something I should be able to do and do quickly. 

 

Thanks so much!

StellaBon

8 REPLIES 8
seven
12 - Quasar

 

Hi,

 

Alteryx does not allow for commas and other characters to be in a Numeric data type field. There is no other way outside of the reporting suite to add these commas to a Numeric field. A great way is to use the Multi-Field formula tool to convert the field to a String and add a thousands separator. I have included an image to show how you can do it as well as a before and after.

 

seven_0-1595108453591.png

 

Before:

seven_1-1595108480817.png

After:

seven_2-1595108493886.png

 

 

StellaBon
11 - Bolide

Ah, ok thank you for clarifying. Yes I was playing with the interactive chart tool and just trying to get my numbers into a more viewer friendly format. Thanks,

 

StellaBon

seven
12 - Quasar

@StellaBon 

Please mark this as an accepted solution. Thank you.

jjimenez
8 - Asteroid

Hello Seven,

 

I understand the ",0" is the round with no decimal. Why does adding ",1" get us commas? 

jjimenez_0-1665936488289.png

 

DenisZ
11 - Bolide

@jjimenez, the third parameter is the thousand separator. ToString is constructed as follows: 

ToString(x, numDec, [addThousandsSeparator], [decimalSeparator])

 Thus, adding 1 in the  [addThousandSeparator] will give you the commas (by default). Please visit Conversion Functions | Alteryx Help for more detailed info if you want to change to dot instead of comma. 

PDempsey
7 - Meteor

This is rounding up my amounts, how can I get it to always show 2 decimal places?

 

PDempsey_0-1687366921806.png

 

Sering
5 - Atom

@pdempsey removing the zero and replacing it with a 2 will show 2 decimal places. 

 

Please mark this as solved if this helps.

 

 
 

 

goatley1
7 - Meteor

I know this is old, but in the results window you can also use the "show numeric separator". It is three zeros in the top right of the results window.

Labels