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
Solved! Go to Solution.
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.
Before:
After:
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
Please mark this as an accepted solution. Thank you.
Hello Seven,
I understand the ",0" is the round with no decimal. Why does adding ",1" get us commas?
@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.
This is rounding up my amounts, how can I get it to always show 2 decimal places?
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.