About Creating Custom Rules

Custom rules let you modify or create data in place. In a custom rule, you define:

  • The target range for the calculation

  • The formula to execute for all cells in the target range

You can use custom rules to:

  • Calculate driver data

  • Create what-if changes

  • Adjust costs and revenues

Design Considerations

When creating custom rules, keep in mind the following:

  • Member selections in the rule target really means "traverse these intersections"

  • The target range defines the Level 0 intersections the rule will visit, executes the formula, and writes the result to the result member.

  • The rule formula supports basic math functions

  • CASE statements work, other MDX functions are not supported

Best Practices

Custom rules are very sensitive to sparse ranges. To prevent performance challenges:

  • Minimize the target range as much as is practical.

  • Use NONEMPTYTUPLE on one of the formula operand tuples preceding formula. See Skipping Empty Tuples to Optimize Calculations.

    For example:

    [PCM_Adjustment In]:= NONEMPTYTUPLE ([PCM_Input],[PCM_Rule]) ([PCM_Input],[PCM_Rule]) * .10;

Custom Rule Example

In this example, the Entity and Account dimensions are specified for the target range for the calculation, and the formula will be executed for all cells in that range.

Example of a Calculation Rule

Note:

The custom rule in this example is used in the BksML50 sample application provided with Enterprise Profitability and Cost Management. See Creating the Sample Application for information on how to access the sample application.