Alteryx Designer Desktop Discussions

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

Bringing in thousand separator

BillyL14
8 - Asteroid

Hi 

Am trying to bring in thousand separator using below, not sure what is wrong, have experimented with a few different data types.  Any advice? thanks 

WL1_0-1603042885723.png

 

8 REPLIES 8
Emil_Kos
17 - Castor
17 - Castor

Hi @BillyL14,

 

according to this topic:

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Insert-Thousand-Separator-with-Formula...

 

you need to use this formula:

 

TOSTRING(1000.2, 2, 1)returns "1,000.20" as a text string

 

in order to make it work for your example we need to put a column name:

 

TOSTRING([sales], 2, 1)

mbarone
16 - Nebula
16 - Nebula

Hi @BillyL14 ,

Your formula is fine, but it only works for NUMERIC fields.  Your 138038 as you show in your screen shot is a STRING field.  If it were a numeric field, then your formula would work.

BillyL14
8 - Asteroid

Hi @mbarone 

I actually have tried a numeric field but doesn't seem to work for me

Have attached my workflow in case my problem is coming from somewhere upstream? Bit confused

 

Thanks

mbarone
16 - Nebula
16 - Nebula

You need to attach the spreadsheet otherwise the module doesn't work.  But I can see what's happening, I think.

 

ToString must result in a "string" field.  You must have a "numeric" field going into the formula tool.  You can't update a numeric field to a string field with a formula tool.

 

So . . . create a new field with the formula tool, say "Sales_String", and then it will work.

BillyL14
8 - Asteroid

@mbarone  thanks a lot, bringing in the new column did the trick

BillyL14
8 - Asteroid

@Emil_Kos thanks

mbarone
16 - Nebula
16 - Nebula

Great!

ypt
7 - Meteor

Hi there!

 

My field is a NUMERIC field and I've tried to add a new column (Total APE_String) and in the preview, I can see 1,141,899.21. However, after running, there is still no thousands separator in the results window. Is there something I'm missing here? Thanks in advance.

 

ypt_0-1657871119948.png

 

ypt_1-1657871137729.png

 

 

Labels