Calculate Database Subsets

As an example of calculating subsets of an Essbase cube, this calc script uses the @DESCENDENTS function to limit calculation scope.

This example shows how a regional Marketing manager can calculate her respective area of the cube. The calculation script uses @DESCENDANTS(East) to limit the calculations to the East region, as it calculates the Year, Measures, and Product dimensions for each child of East.

The following image shows an outline of the East, West, South, and Central members in the Market dimension:

Figure 25-2 East, West, South, and Central Members in the Market Dimension


This image shows the outline of the Market dimension, as described in the text preceding the image.

Example script:

/* Calculate the Budget data values for the descendants of East */

FIX(Budget, @DESCENDANTS(East))
   CALC DIM(Year, Measures, Product);
ENDFIX

/* Consolidate East */

FIX(Budget)
   @DESCENDANTS(East);
ENDFIX

Essbase performs the following actions:

  1. Fixes on the Budget values of the descendants of East.

  2. Calculates the Year, Measures, and Product dimensions in one pass for all Budget values of the descendants of East.

  3. Fixes on the Budget values for all members on the other dimensions.

  4. Aggregates the descendants of East and places the result in East.