Go to primary content
Previous
Previous
 
Next
Next

Create/Edit Cube: Aggregation Rules or Measure Aggregation Rules

Aggregation rules identify the aggregation operators for each dimension of the cube, the order of aggregation, the hierarchies included in the aggregation and the level at which to begin aggregation, and other options. All measures in a compressed cube must use the cube aggregation rules. For uncompressed cubes, you can specify unique aggregation rules for each measure.

These options appear only when defining measure aggregation rules for an uncompressed cube:

Aggregation Rules Specification

The available dimensions appear in a list. By default, all dimensions are selected.You can accept the default values in the expression editor or you can delete them and specify aggregation rules for the dimensions you select in the order you desire.

To specify aggregation rules for a dimension: 

  1. Click the location in the expression editor at which you want the expression syntax to appear.

  2. Double-click the dimension in the list or drag-and-drop it onto the expression editor.

The dimensions are aggregated in the order in which they appear in the expression editor. When the aggregation operators are the same across all dimensions, the order is not important. However, some combinations of operations produce different results depending on the order in which they are calculated.

To change the order of aggregation: 

  1. Select the expression syntax for a dimension from the expression editor and delete it.

  2. Click the location in the expression editor at which you want the expression syntax to appear.

  3. Double-click the dimension in the list or drag-and-drop it onto the expression editor.

Expression Editor

Displays the expression syntax of the aggregation rules for the selected dimensions. When you select an expression in the editor, a template for the complete SQL statement for the aggregation rules appears below the editor. You can change the value of an underlined element in the template.

The values you can specify in the template are the following:

To change a value in the expression syntax: 

  1. Click the underlined value in the template.

  2. Select a different value from the list that appears.

For example, the expression syntax for the default aggregation rule is the following:

SUM
  MAINTAIN COUNT
  OVER ALL

The template for that expression is the following:

Sum over ALL dimensions with options Maintain Count Allow Overflow
Allow division by Zero Ignore Nulls

If you click Maintain Count and select Don't Maintain Count, then the expression changes to the following:

SUM OVER ALL

The expression editor provides the following tools:

Icon Description
Counterclockwise arrow icon
Reverses the last change (undo).
Clockwise arrow icon
Reapplies the last change after it is reversed (redo).
Scissors icon
Copies the selected text to the clipboard and deletes it from the text area (cut).
Two pages icon
Copies the selected text to the clipboard (copy)
Clipboard and page icon
Copies the contents of the clipboard to the text area (paste).
Pencil eraser icon
Erases the entire contents of the text area.
Right-justification icon
Formats the aggregation rules for the dimensions into individual lines.
Window and check mark icon
Checks the syntax of the selected text.

Syntax: Dynamically displays Valid or Invalid for the syntax shown in the text area.

Related Topics

"Aggregation Operators"

"About Advanced Aggregation Operators"

"When Does Aggregation Order Matter?"