In this post, we will show you examples of an exchange rate cube, a planning cube, and how to set up the rules between them. This topic is very much present in a lot of projects and therefore we will explain the simple logic behind it.
Exchange rate cube
For every project exchange rate functionality is probably one of the must-have cubes. The logic behind is simple. We need a place to store rates and the place where we calculate them with the planned data. For keeping rates somewhere we need a cube with at least 2 dimensions:
- Month or Day
- Currency
It is important to dedicate one reporting currency. In our case the central currency is EUR. All the other currency data will be converted to EUR.
Another cube is the place where we plan the data. This cube will contain more dimensions like:
- Month
- Version
- Country
- Currency
- Measure
In the end connection between these two cubes will be done by a rule:
In this rule, we are dividing data that is not in EUR with the exchange rate of the planned currency. Data already reported in EUR doesn’t need to be converted, so for the USA it will be 2797 EUR = 3000 USD / 1.1[EUR/USD]
As you can see from the image above we are using something called Query in rules. More about that can be found on the following link.
The whole project can be found here.