Understanding Override Order of Precedence

You must understand default aggregation and the order of precedence that the analytic calculation engine uses to override the default aggregation. When calculating aggregate members, Analytic Calculation Engine begins with the most specific override available, and then proceeds to more general overrides. The analytic calculation engine uses this order of precedence to evaluate aggregate members:

  1. If the dimension does not contain any aggregate members, use the data cube's formula.

    If the dimension does contain aggregate members, perform one of these actions:

    • If aggregate calculation is not enabled for the data cube, do not perform any more calculation of aggregates.

      Note:

      The analytic calculation engine generates an error when the analytic model is loaded.

    • If the Calculate Aggregates option is selected for the data cube, perform step 2.

  2. Perform one of these actions:

    Note:

    In either of these cases, the analytic calculation engine loads initial values from the aggregate record when the analytic model is loaded, but overwrites the initial values upon recalculation.

    • Use the cube dimension override user function if it exists.

      This override operates on all of a dimension's aggregate members for the dimension as it is attached to a specific data cube.

      For example, you can create one cube dimension user function to operate on the PRODUCTS dimension when it is attached to the SALES data cube, and another cube dimension user function to operate on the PRODUCTS dimension when it is attached to the COST_OF_GOODS data cube.

      To set a cube dimension override user function, create a user function in the analytic model, and then select the user function in the Aggregate Rule column in the Dimensions tab of the data cube's properties.

    • If the cube dimension user function does not exist, perform step 3.

  3. Perform one of these actions:

    • Use the member override user function.

      This override operates on specific members of a dimension. You create the member override user function in the analytic model. However, because members are often instantiated at runtime, you use the PSACETREEOVRD subrecord to assign the member override user function to the dimension rather than assign the member override user function to specific members within the analytic model.

      For example, if the end user enters aggregate data, you can write a member override function that uses the INPUT built-in function to capture the user input, and use the PARENT and CHILDCOUNT built-in functions to push down the aggregate data and create new members. Then you can assign the member override user function to the appropriate dimension in the PSACETREEORRD subrecord.

      Note:

      If the member override user function does not contain a value, Analytic Calculation Engine applies the default aggregation (the plus operator) to the dimension members.

    • If the member override function does not exist, perform step 4.

  4. Perform one of these actions:

    • Use the dimension override function.

      The analytic calculation engine uses this override user function to calculate all of a dimension's aggregates as they apply to all dimensions.

      For example, suppose you create a dimension override function for the PRODUCTS dimension. If this dimension is attached to both the SALES and COST_OF_GOODS dimensions, the dimension override function applies to the aggregates for both data cubes.

      To set a dimension override user function, create a user function and select the user function in the Aggregate Function field of the dimension's properties.

      Note:

      This override function does not apply to leaf members or detail members.

    • If the dimension override function does not exist, perform step 5.

  5. Aggregate the values of the child members by using the operators that are attached to each child.

    The analytic calculation engine iterates over each value to evaluate the aggregate.

    The default operator for each member is the plus operator.

    You set the operators in the OPERATION field of the PSACETREEOVRD subrecord. When the default sum operator is used, the actual value in the OPERATION field is null.

    If you do not want to use the default sum aggregation, you can populate the OPERATION field with one of these values:

    • MIN.

      Use this value for the analytic calculation engine to use subtraction aggregation. The analytic calculation engine iterates over each member and applies the subtraction operator to each iteration. The aggregate value is the resulting value after the final iteration.

    • IGN.

      Use this value for the analytic calculation engine to ignore the OPERATION field.