Writing rules to external cubes

In a cube rule you can refer to an area within the cube as part of the source of your equation. You can also refer to an area in a cube other than the one for which you are writing a rule as part of the source of your equation.

When referring to an area in an external cube, use this syntax:

DB(Cube,Dim1Element,Dim2Element,DimxElement)

Cube is the name of the external cube, and Dim1Element is an element of the first dimension of Cube, Dim2Element is an element of the second dimension of Cube, etc.
Note: You must specify arguments for all dimensions of the external cube

If your main cube and external cube share common dimensions, you can want specify the argument for a particular dimension as a variable. This way the rule would cover all elements in the dimension that the two cubes have in common. To specify a dimension argument as a variable, enter the dimension name as the argument, preceded by an exclamation mark, e.g. !REGIONS. Do not enclose the argument in quotes.

Example of an external cube rule

Assume the cube for which we are writing our rule contains the dimensions Currtype, Regions, Products, Months and Measures and that the Currtype dimension contains two elements: Local Currency and Head Office Currency.

Also assume that there is an external two-dimensional cube called EXCHRATE. This cube stores exchange rates by country and by month. It uses the same Regions and Months dimensions as the main cube.

We could then write an equation which would calculate the Local Currency by multiplying the Head Office Currency by the appropriate exchange rate from the EXCHRATE cube.

['Local Currency']=:['Head Office Currency']*DB('EXCHRATE',!Region,!Month)

When calculating the Local Currency for Germany and May, for example, the calculation refers to the rate in the cell defined by Germany and May in the EXCHRATE cube.

There is one rule to follow when writing such variable external cube references. The dimension of the external cube must be a superset of the dimension of the same name in the main cube. If the dimension in the main cube contains an element that is not contained in the dimension of the same name in the external cube, an error will occur when that element is accessed.

In the Target section of a rule and an accelerator you cannot enter references to external cubes. The External Reference button is disabled for these areas.

You can also use the Cell Reference dialog to create rules for external cubes.

SeeThe Cell Reference dialog.