Building Currency Conversion Applications and Performing Conversions
This topic describes how to build a currency conversion application and convert currencies. The instructions use a main cube, Sample.Interntl, and a currency cube, Sample.Xchgrate as examples. You can recreate these to follow along with the instructions.
To build a currency conversion application and perform conversions,
-
Build the sample cubes used in this documentation.
-
In the Essbase web interface, click Files and navigate to
gallery/Technical/Currency Conversion
. -
Copy
LCM_Sample_Currency.zip
to your own directory underusers
. -
Click Jobs.
-
From the New Job menu, select Import LCM.
-
Select the
LCM_Sample_Currency
zip file from your user directory. -
Click OK to build the Sample_Currency.Interntl cube using Lifecycle Management (LCM).
-
-
Open the main cube's outline and prepare it for currency conversion. The Interntl cube is already prepared, if you imported it, but this topic uses it as an example anyway. If you are working with another cube, open the outline for editing, if you need to make any of the changes indicated in this section.
-
Click Applications and refresh the list.
-
Expand the application (in this example, Sample_Currency).
-
To the right of the cube name (in this example, Interntl), select Outline from the actions menu.
-
In the outline viewer, confirm that the outline contains:
-
a dimension tagged as time
-
a dimension tagged as accounts
-
a dimension tagged as country
-
-
Assign a currency category to the accounts dimension (and to members within this dimension) to handle different categories of exchange rates. Child members inherit the dimension category unless you specify them differently.
-
Tag any members that should not be converted as No Conversion. The No Conversion tag is not inherited. None does not indicate no conversion; rather, it indicates that the conversion category is unspecified (thus inherited).
-
Assign currency names to members in the country dimension. For the top-level member, assign the currency name of the base currency (for example, USD) to ensure that the base currency is inherited down the country dimension hierarchy. When the children of a member share a single currency, you only need to define a currency name for the parent.
-
Optional: Tag one dimension as a currency partition
, to tell Essbase which part of the cube holds local data and which holds base data.
The dimension you tag as the currency partition contains members for both local and base values. This dimension holds the data that users input in their own currencies. The local data is converted to the base data using currency conversion calculation scripts.
-
Apply the Label Only tag to dimensions and members that do not store data.
-
Save the outline, if you made changes.
-
If you are using the samples described in this section, the currency cube Sample_Currency.Xchgrate already exists.
If you are working on your own main cube, and a currency cube does not exist yet, generate it now. From the main cube outline viewer, in the Inspect group, click the yen symbol
, and provide a name for the currency cube.
-
-
Link the main and currency cubes, if they are not already linked. The following image of the cube inspector shows that Sample_Currency.Interntl already has a linked currency cube named Xchgrate:
-
Calculate the currency conversion. Using the CCONV command in a calculation script, convert data values from a local currency to a common, converted currency. For example, you might convert data from a variety of currencies into USD. You can convert the data values back to the original, local currencies using the CCONV TOLOCALRATE command.
-
Track currency conversions. Use the CCTRACK application configuration setting to control whether Essbase tracks which currency partitions have been converted, and the exchange rates used.
-
Troubleshoot currency conversions, if needed.
If you receive an error linking the currency cube to the main cube, ensure that the main cube meets these criteria:
-
A dimension is tagged as time.
-
A dimension is tagged as accounts.
-
The accounts dimension has a currency conversion category defined for the categories of accounts that you wish to convert.
-
All members of the accounts dimension that should not be converted are tagged as No Conversion.
-
A market dimension is tagged as country.
-
The country dimension is assigned a currency name, even if each member in the dimension is individually assigned a currency name.
-
Each member of the country dimension has an associated currency name or inherits the currency defined at the dimension level.
Also ensure that the currency cube meets these criteria:
-
A dimension is tagged as time.
-
The time dimension contains each member that is defined in the time dimension in the main cube. Make sure that each member is included and spelled correctly.
-
If you use Dynamic Time Series members in the main cube, you must use them in the currency cube.
-
A dimension is tagged as accounts. The accounts dimension in the currency cube contains the account categories defined in the main cube.
-
A dimension is tagged as country and contains the names of the currencies used in the dimension tagged as country in the main cube. Make sure that each currency is included and spelled correctly.
-
Make sure that the currency cube is started.
-