Hello all
I am very new to Alteryx and I am gradually trying to migrate all our manual reports over.
My situation is;
In the source data file I have a "Total Overdue" column. This column is set as a V_String. I need it to be a currency column (as in it has a £ in front of the numbers, and has commas and set to 2 decimal places).
So if it says this - 555676.8023
I need it to say this - £555,676.80
At present I have managed to set the V_string length to 15 decimal places to show the correct number of numbers and I have also used a formula to add in the "£" sign at the beginning ("£"+toString([Total Overdue],1,2)
So it now looks like this - £555676.80
but I cant for the life of me sort out the comma??
Any help would be greatly appreciated - thankyou in advance
Hi @RWilson have a look at this article on the Alteryx community "Everything You Need to Know About Currency"
If you add Comma to the number it becomes String and mathematical operations like sum, diff would not be possible.
Hey JosephSerpis
I've seen this article before but didn't have much luck. I've tried again and copied his steps but it results in the following error message ;
"The formula resulted in a string but the field is numeric"
Thank you but that hasn't worked either
I suggest to work first the computations for numeric data type and convert it to string type to allow the comma and dollar sign as the final output.
@RWilson based on the fact that you're getting "The formula resulted in a string but the field is numeric" as an error message, when you're making your new field, you'll need to ensure that this is a string data type - in the drop down menu under the expression editor. The error suggests that you have the data type set to numeric and you're trying to create a string within it.
@RWilson Could you try this method:
Change the Data Type of the column "Total Overdue" to Double.
and add a new Formula with a new column with V_String data type, containing this expression:
"£" + toString([Total Overdue],2,1)
You can then deselect the unwanted column using Select Tool.
Hope that helps