Keeping Local and Converted Values

You can keep local and converted values in a database. In the main database, you must define the members that store the local and converted values by creating a currency partition dimension (see Main Database). The currency partition dimension has one partition for local values and one for converted values.

  To create a calculation script that copies local data to a converted partition and calculates the data:

  1. Use the DATACOPY command to copy data from the local to the converted partition.

  2. Use the FIX command to calculate only the converted partition and use the CCONV command to convert the data.

    Note:

    When using a currency partition dimension, you must FIX on a member of the dimension to use the CCONV command.

  3. Use the CALC command to recalculate the database.

The following example is based on the Sample.Interntl database and the corresponding Sample.Xchgrate currency database. Figure 47, Calculating Local and Converted Currency Conversions shows the currency partition from the Sample.Interntl database.

Figure 47. Calculating Local and Converted Currency Conversions

This image shows the currency partition from the Sample.Interntl database.

The following calculation script performs three currency conversions for Actual, Budget, and Actual @ Bud Xchg data values:

/* Copy data from the local partition to the master partition (for converted values) */

DATACOPY Act TO Actual;
DATACOPY Bud TO Budget;

/* Convert the Actual data values using the "Act xchg" rate */

FIX(Actual)
  CCONV "Act xchg"->US$;
ENDFIX

* Convert the Budget data values using the "Bud xchg" rate */

FIX(Budget)
  CCONV "Bud xchg"->US$;
ENDFIX

/* Convert the "Actual @ Bud XChg" data values using the "Bud xchg" rate */

FIX("Actual @ Bud XChg")
  CCONV "Bud xchg"->US$;
ENDFIX

/* Recalculate the database */

CALC ALL;
CALC TWOPASS;

The following calculation script converts the Actual and Budget values back to their original local currency values:

FIX(Actual)
  CCONV TOLOCALRATE "Act xchg";
ENDFIX

FIX(Budget)
  CCONV TOLOCALRATE "Bud xchg";
ENDFIX
CALC ALL;

Note:

When you convert currencies using the CCONV command, the resulting data blocks are marked as dirty for the purposes of Intelligent Calculation. Thus, Essbase recalculates all converted blocks when you recalculate the database.