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,

  1. Build the sample cubes used in this documentation.

    1. In the Essbase web interface, click Files and navigate to gallery/Technical/Currency Conversion.

    2. Copy LCM_Sample_Currency.zip to your own directory under users.

    3. Click Jobs.

    4. From the New Job menu, select Import LCM.

    5. Select the LCM_Sample_Currency zip file from your user directory.

    6. Click OK to build the Sample_Currency.Interntl cube using Lifecycle Management (LCM).

  2. 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.

    1. Click Applications and refresh the list.

    2. Expand the application (in this example, Sample_Currency).

    3. To the right of the cube name (in this example, Interntl), select Outline from the actions menu.

    4. In the outline viewer, confirm that the outline contains:

      • a dimension tagged as time Clock icon from the web interface, indicating Dimension type = Time

      • a dimension tagged as accounts Number-symbol icon from the web interface, indicating Dimension type = Accounts

      • a dimension tagged as country Globe icon from the web interface, indicating Dimension type = Country

    5. 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.
      Member properties for the top Accounts dimension member, showing a currency conversion category named P&L (Profit and Loss)

    6. 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).
      Member properties, General tab, showing No Conversion selected as the currency conversion option

    7. 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.
      Member properties, General tab, showing USD selected as the currency name

    8. Optional: Tag one dimension as a currency partition Dollar-sign icon from the web interface, indicating Dimension type = Currency partition, to tell Essbase which part of the cube holds local data and which holds base data.
      Member properties, General tab, showing Currency partition selected as the dimension type

      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.

    9. Apply the Label Only tag to dimensions and members that do not store data.
      Member properties, General tab, showing Label only selected as the data storage type

    10. Save the outline, if you made changes.

    11. 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 yen symbol icon from the outline viewer in the web interface, and provide a name for the currency cube.
      Generate currency database button in the outline viewer interface

  3. 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:In the cube properties for the main cube Interntl, on the Currency tab, the Xchgrate cube is shown as the Currency database, the conversion method is Divide, the default currency type member is Act xchg, the Country dimension is Market, and the Time dimension is Year

  4. 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.

  5. 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.

  6. 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.