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.
RESUELTAS

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

StellaBon
Bólido

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

12 RESPUESTAS 12
seven
Cuásar

 

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
Bólido

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
Cuásar

@StellaBon 

Please mark this as an accepted solution. Thank you.

jjimenez
Asteroide

Hello Seven,

 

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

jjimenez_0-1665936488289.png

 

DenisZ
Bólido

@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
Meteoro

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

 

PDempsey_0-1687366921806.png

 

Sering
Átomo

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

 

Please mark this as solved if this helps.

 

 
 

 

goatley1
Asteroide

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.

Ariz
Meteoro

hi 

 

thanks for the solution, how can I put separators for millions please ?

Etiquetas
Autores con mayor cantidad de soluciones