Solution Patterns
Show a currency label per client
Show each customer's currency symbol on a metric with a dynamic property.
A dynamic property puts a value, such as USD, into the metric’s text. It changes the label only. It does not convert amounts between currencies.
Before you start
- Your data has the currency for each customer, for example a
currencycolumn.
Steps
- Open the metric and select Dynamic Property in the toolbar above the chart.
- Select Property.
- In Property Name, enter
Units. The app shows[[Units]]under the field. - In Property Type, choose Auto to pick a Dataset and a column, or Custom to write SQL.
- Select Create.
![Metric editor toolbar with Dynamic Property selected and the New property form open: Property Name set to Units and highlighted, [[Units]] shown below it, Property Type Auto or Custom, Dataset, Choose a Column, Choose an aggregate, and Discard and Create buttons.](/images/docs-studio/solutions-currency/new-property-units.png)
- Type
[[Units]]where the label goes: the metric name, its description, or a Prefix or Suffix in the chart settings. - Save the metric.
Each customer now sees their own currency label, for example USD 1,200.
Where [[Units]] works
- Metric name, description and long description
- Prefix and Suffix of a Single Value chart
- Label prefix and suffix in the chart settings
If the property has no value, the text keeps [[Units]]. Set a default value to avoid that.
If something goes wrong
- “Client Filter is not available for a Custom SQL property.” Switch Property Type to Auto to scope the property by client.
See Dynamic properties.