Free Trial

Alteryx Designer Desktop Discussions

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

Converting a double to a dollar amount

PJ100
5 - Atom

Hello, I have a Column called "Sum" that is a double.

 

I would like to convert the values in the "Sum" column to be dollar amounts.

 

For example the value "15700" would be "$15,700". Please provide a solution and or formula for my workflow.

5 REPLIES 5
DataNath
17 - Castor
17 - Castor

Hey @PJ100, the following Formula expression ought to do the trick. If you want decimals, just change the 0 to the amount of decimal places you'd like:

'$'+ToString([Sum],0,1)

 

It's worth noting that you'll need to create a new field or convert the data type here. You can't overwrite/keep the [Sum] column as is, as it's impossible to have a numeric (double in this case) field with string elements (the $ sign and comma separator).

 

binuacs
21 - Polaris

@PJ100 one option using the multi-field formula

image.png

Raj
16 - Nebula

This will convert it to string Value
"$"+tostring([your column name],0,1)

cjaneczko
13 - Pulsar

A note on this if you plan to export to excel with the dollar signs, Excel will treat the field as a string and you will not be able to perform any additional calculations there without doing some cleanup. If its going to export to excel, you may want to do all of your formatting there and setup your output tool to overwrite but preserve all formatting. That way it comes out of Alteryx as Double, but appears to have the $ and commas in Excel where you can continue to perform numerical functions on the data. 

nagakavyasri
12 - Quasar

@PJ100 

Capture.PNG

Labels
Top Solution Authors