Hello,
I have a column in my file with multiple rows of numbers like 30000, 565000 and so on.
I want to convert these to string format like 30,000 and 565,000 and so on.
Could you let me know how to do this?
Thank you!
Solved! Go to Solution.
Hi @poonawala001 ,
once you convert to a string, you won't be able to do math with these fields.
you can use a formula to create a new field or use a multi-field formula and change the type.
ToString([your field],0,1)
TOSTRING(x, numDec, addCommas)Converts a numeric parameter to a string using [numDec] decimal places. There is also a third parameter to return the appropriate comma.
Optional Parameters:
addCommas: 0 or false (default) means format the numeric string without commas; 1 or true means format with commas.
cheers,
mark
Thanks Mark for the prompt response. So the column where I have the 30000 number is a "Text" column, is there a way I can make it numeric, very similar to the comma-style thousand separator format in Excel?
ToNumber([your field])
but before you do that, if there are commas present:
replace_char([your field],",",'')
you can then change type in a select to int64 if you didn't define a new numeric field.
cheers,
mark
Alteryx doesn't apply masks to data in a browser.
numbers appear without thousands separators. So text field can have them, but are not capable of math. Only convert to text for output would be my recommendation. I seldom convert to text unless I'm done with all calculations and need to make the data pretty.
thanks for the question,
mark