Currency conversion algorithm
On-the-fly currency conversion calculation¶
The reporting engine can convert values read from the database based on two conversion options specified in the form:
- The FX rate option, specified on the Currency dimension (or via the Reference FX rates), which determines the FX rate to be applied.
- The Periodic value calculation option, included among the Period Length dimension properties, which determines the periodic value calculation method. Valid for the Financial Workspace only
The conversion algorithm is defined by the combination of the FX rate and Periodic value calculation options.
IMPORTANT: On-the-fly conversion does not support the following FX rate types: Previous Final FX rate and Historical FX rate
Calculation of the equivalent value of a periodic amount¶
There are two possible algorithms for converting a periodic amount:
- Convert the monthly figure at the period FX rate: (YTD(n)-YTD(n-1) ) * Fx(n). This algorithm is applied when the periodic figure is calculated as Aggregation of periodic values.
- Convert the YTD figure at the period FX rate and then calculate the periodic value: YTD(n) * Fx(n) - YTD(n-1) * Fx(n-1). This algorithm is applied when the periodic figure calculated as Net Year-to-date values.
Calculation of the equivalent value of a cumulated amount¶
When the equivalent value of a cumulated amount is calculated, in June, for example, there are two possible conversion algorithms:
- conversion of the cumulated value for the period (June)
- calculation of the converted amounts of the individual periods from the start of the year that are then added together (the monthly contributions from January to June).
In both cases (periodic figure and cumulated figure), the type of algorithm to be applied is determined by the Periodic value calculation option, present among the Period Length dimension properties.
Example
Details of the algorithms applied in the presence of the value in the example are provided below.
| Type/Period | Jan | Feb | Mar | Apr | May | Jun |
| Cumulated amount | 86 | 242 | 531 | 761 | 798 | 1166 |
| Conversion rate | 1.1853 | 1.1251 | 1.0014 | 1.0026 | 1.1776 | 1.1822 |
To calculate the net year-to-date values on the quarterly figure for June, the following algorithm is used:
1166 * 1.1822 - 531 * 1.0014 = 846,7018
To calculate the aggregation of periodic values on the quarterly figure for June, every monthly contribution is converted at the FX rate of the period to which it makes reference using the following algorithm:
(761 - 531) * 1.0026 + (798 - 761) * 1.1776 + (1166 - 798) * 1.1822 = 709,2188