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. This image shows the outline of the Market dimension, as described in the text preceding the image.](img/asmark02.jpg)
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:
-
Fixes on the Budget values of the descendants of East.
-
Calculates the Year, Measures, and Product dimensions in one pass for all Budget values of the descendants of East.
-
Fixes on the Budget values for all members on the other dimensions.
-
Aggregates the descendants of East and places the result in East.