Formatting Currency Values in Tables and Charts
Last updated: November 27, 2024
Tables
For tables, you can format currency values by selecting the dollar sign ($) option and applying a multiplier. To display values in millions, use a multiplier of 0.000001. For thousands, use 0.001.
*Note that this will not add the "M" or "K" suffix automatically. To display that, you can customize the column title, for example "Revenue ($M)".
Charts
For charts, you can prefix values with a currency symbol like the dollar sign ($). To display values in millions or thousands, you will need to perform the calculation in your SQL query, for example:
case
when sum(revenue) > 1000000 then concat('$', cast(sum(revenue)/1000000 as decimal(10,1)), 'M')
when sum(revenue) > 1000 then concat('$', cast(sum(revenue)/1000 as decimal(10,1)), 'K')
else concat('$', cast(sum(revenue) as decimal(10,2)))
end as formatted_revenue
This query will display revenue values above 1 million as "$10.5M", above 1 thousand as "$10.5K", and below 1 thousand as the full dollar amount like "$425.00".
To show different currency signs for different countries and currencies, take a look at our internationalization features here (docs).