How to add commas to a string from a calculated field

Hi, I recently added a calculated field to enable multi-currency support for revenues. I did this by concatenating a parameter with the customer’s currency symbol to their revenue, like this:

concat(${paramClientCurrency},toString(revenue))

Since the output is a string with a currency symbol, QuickSight doesn’t seem to recognize it anymore, which means I can’t use the built-in tools to format it. I’m just looking to add commas back in.

I would appreciate any help anyone has to add commas. I’m aware that it may not be as simple as adding it every 3 digits past the decimal, because an output may come out like €,100,000.00 (the comma to to the left of the 1).

Thanks in advance for any help!

Hi sbcallender, Welcome to the community!

I want to understand more about your use case and why are you concatenating currency and revenue field. Can you have a revenue field as an integer and currency type field as a string separate in your dataset and visual. That way you will able to perform all the arithmetic operations as well on the revenue field

1 Like

Hi imaitri, thanks for the welcome!

From what I could find, I need to convert revenue to a string before I can use the concat function. I just tried again to concatenate the currency symbol (this time converting to a string) while keeping revenue as an integer. The calculated field errors.

Am I missing something?

Hi @sbcallender – now multi-currency is support at the field level, click here.