Set up Currency Conversion in Datamart

Every record/row of a Datamart can be in a different currency. When querying the Datamart data (either by calling a Groovy API function or indirectly via built-in charts), you want to get the aggregated data in a single currency, so that the money summarizations are meaningful.

When you query the data, there will be an automatic conversion of money fields to the target/requested currency. If you do not request the target currency explicitly, it will use the base currency set for the Datamart.

The exchange rates are looked up at query time, meaning there is no need to refresh the Datamart after updating exchange rates.

To make the conversion work, follow these steps.

Set up Datamart Fields

image 20210924 131138
  • Pricing Date – One Date field must be marked as the Pricing Date function. This date will be used to look up the right currency conversion in the ccy Data Source.

  • Currency – There must be one field of the type Currency for each Data Source that adds at least one Money field to the Datamart. Currency fields in the Datamart are not to show in which currency the records of this Datamart are. This is set by the Base Currency field and all the Money fields will be in this currency. Datamart currency fields are only references that point to the currency that will be used for the conversion of each Data Source record (with Money fields) to the Datamart base currency.

  • Base Currency – When querying the data, you can either specify the target currency, and if you do not, then the query result will be in the Base Currency specified for the Datamart.

Upload Data to ccy Data Source

image 20210924 132224

You must upload data to the ccy Data Source. The currency conversions can be specified either per day or per date range. If you specify a date range, then in the data you upload you still specify only Valid From. The Valid to date will be automatically derived from the uploaded data right after the upload.

You must provide all combinations of Ccy From, Ccy To and Ccy Valid From.

  • Ccy From – You need to provide all currency symbols which you use in your data and which you will upload to the system.

  • Ccy To – You need to provide all currency symbols which you would like your users to be able to use in the built-in charts or in the Datamart queries.

  • Ccy Valid From – The first date of the validity of the conversion rate.

  • Ccy Valid To – The date of a day right after the last date of the validity period (i.e. this date does not belong to the validity period). I.e. the exchange rate is applied to the CcyValidFrom date, as well as any date before CcyValidTo. Note that this value is automatically derived from the other records. So do not supply this value for the upload.

To see descriptions of all fields, go to Data Source "ccy" - Currency Conversion.

Configure Daily Conversion Optimization

If you use exchange rates which change every day, set up the daily conversion optimization.

Troubleshooting

Found an issue in documentation? Write to us.

Â