Hello
I am cleaning a dataset and there are a few currency fields and a percent field in decimal form. I want to restrict the number of characters after the decimal to only 2. On the currency fields, I want to format as currency with commas, which are currently missing. I think I need to achieve this by using a formula but I can't pinpoint which formula I should use to achieve the 2 goals. I keep receiving error messages. I've included a sample of the data below. The first column is a currency field that needs currency formatting, commas. The fifth column is percent in decimal format but I want no more than 3 characters after a decimal. Both columns were assigned as Double for the type.
Thank you, in advance, for your comments and advice.
Solved! Go to Solution.
@Lvworking one way of doing this, when you add a "," to the amount, the data type should change to vstring
When I went to make the changes to type, I noticed my types were off. The percentage column was set to V_WString and the currency column was set to double. When I changed the percentage column to double, it automatically rounded to 2 spaces after the decimal. I was going to do 3 but 2 works just as fine so I left that column.
I changed the currency column to V_WString and applied the ToString formula but it remains unchanged (see below). I feel like I am overlooking something simple.
@Lvworking The Tax_Due field is string type, thats why the toSTring() function is not working for you, to work that apply toNumber() function like below
Ok that makes perfect sense! That worked and now I know the formulas do not treat all string types the same. I really appreciate your assistance and quick responses!