Cube rules

You edit cube rules on the Rules tab of the Edit Database dashboard.

The Rules tab has these panes:

  • Rules: Lists existing cube rules
  • Editor: Where you create and edit rules
  • Object browser: Lists all objects of a selected cube, including subsets and attributes
  • Elements: A preview of the elements of a hierarchy that is selected in the object browser
  • Functions: A guide to the functions that can be used in cube rules.

Written mathematically, cube rules have this general syntax: [MEASURE:'Price']=[MEASURE:'Revenue']/[MEASURE:'Units'] . In the Rule Details section of the cube rule editor, you specify the left hand part of the equation in the Target field. You specify the right hand part in the Formula field.

Double-click objects in the Object browser, the Elements pane, and the Functions pane to add references to those objects to the Target and Formula fields.

To specify multiple elements of a dimension in the target, use braces. For example: [Currtype:{USD, EUR}]

Use the Affected Cells radio buttons to specify the type of cells affected by the rule. The types are All, Consolidated, and Base. If you do not specify a type, all cells will be affected for the calculation. Select Consolidated for only consolidated cells. Select Base for only base cells.

Rules are automatically validated during editing, and without requiring you to save the rule. Validation occurs when you have edited a field and you move to another.

In the Rules pane, use the slider controls to enable or disable rules. Icons indicate whether a rule has unsaved changes or contains errors.

You can use the < and > icons between the columns to resize the editor and create more space for editing. To maximize space, use the menu icon in the widget title to hide the Database Structure widget.

The toolbar has options to save, export, and to import rules. Export exports all rules of the cube. Import replaces all rules of the cube with the rules defined in a file. You cannot export or import individual cube rules.

For backward compatibility, you can select the Enable former rules engine option to use accelerators.

The editor has a Revert option, which is displayed as a toolbar button or menu item, depending on how the editor is sized.
Note: The Revert button on the toolbar of the editor undoes all changes made since a rule was last saved.