We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

how to get values to show as dollars

Ksisterhen
8 - Asteroid

Hi-

 

My current output looks like the below.  These values I want to show as currency.  Note when I try to do a formula ('$' + tostring(field, 2)) to add a dollar sign to this I get an error stating the formula resulted in a string but the field is numeric.

 

 

Additionally, if I just try to create a formula to add the dollar sign not to a string, '$'+ field I get the error - parse error at char(4) type mismatch in operator +

3 REPLIES 3
ShankerV
17 - Castor

Hi @Ksisterhen

 

I would recommend to use Multi Field Formula tool.

 

It helps to add dollar sign using your formula.

 

Plus also allows to change the datatype of the column from Integer to String datatype. 

 

Many thanks 

Shanker V

martinding
13 - Pulsar

Hi @Ksisterhen ,

 

Exactly as ShankerV pointed out, the problem lies in the fact that your original data type for your field is numerical and the formula tool doesn't allow you to update the data type in place.

 

So please use the Multi Field Formula tool, to either create new fields or change the data type in place to 'string'

martinding_0-1679707856063.png

 

danilang
19 - Altair
19 - Altair

Hi @Ksisterhen 

 

Using the methods outlined by @martinding and @ShankerV will add the dollar sign to the values but converting the field types to a string also means that you no longer have access to any arithmetic functions, Total, Average, etc.  In general it's best to perform any formatting operations as the last step before you output the data. 

 

Dan     

Labels
Top Solution Authors