Example 3: SET CLEARUPDATESTATUS and Two CALC DIM Commands

This calculation script bases the database calculation on the Product and Year dimensions. Because two CALC DIM commands are used, Essbase does two calculation passes through the database:

SET CLEARUPDATESTATUS AFTER;
CALC DIM(Product);
CALC DIM(Year);

Error

  Essbase performs the following processes:

  1. Essbase cycles through the database calculating the dirty data blocks. The calculation is based on the Product dimension, as in Example 2: SET CLEARUPDATESTATUS and FIX.

  2. Because the SET CLEARUPDATESTATUS AFTER command is used, Essbase marks the calculated data blocks as clean, although not all data values in each calculated block have been calculated.

  3. Essbase should recalculate the data blocks. The recalculation is based on the Year dimension. However, as a result of the calculation in step 2, some data blocks are already marked as clean, and Essbase does not recalculate them. The calculation results are not correct.

Solution

You can calculate the correct results by using one CALC DIM command to calculate the Product and Year dimensions. Essbase calculates both dimensions in one calculation pass through the database. The following calculation script calculates the correct results:

SET CLEARUPDATESTATUS AFTER;
CALC DIM(Product, Year);

Note:

When you calculate several dimensions in one CALC DIM command, Essbase calculates the dimensions in the default calculation order and not in the order in which you list them in the command. See Member Calculation Order.