Home > OLAP Dialog Boxes and Wizards > Create/Edit Cube: Aggregati...
![]() Previous |
![]() Next |
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:
Measure: Select a measure from the list to define its aggregation rules.
Use aggregation specification from the cube: The aggregation rules for the selected measure default to the rules for the 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:
Click the location in the expression editor at which you want the expression syntax to appear.
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:
Select the expression syntax for a dimension from the expression editor and delete it.
Click the location in the expression editor at which you want the expression syntax to appear.
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:
Operator: The type of calculation you wish to perform across each dimension. For descriptions of the OLAP aggregation operators, see Table: OLAP Aggregation Operators.
When using a weighted or scaled operator, select a measure that contains weight factors. The measure must be dimensioned by the dimension being aggregated, and can optionally be dimensioned by other dimensions in the cube.
Over dimension: The dimension over which the values of the measure are aggregated.
Using hierarchies: One or more hierarchies for each dimension being aggregated. If you omit a hierarchy, then no aggregate values are stored for it; they are always calculated in response to a query. Because such calculations will degrade runtime performance, you should omit a hierarchy only if it is seldom used.
Starting from level: The level at which aggregation starts. This is typically the lowest level in the hierarchy. However, it can be a higher level if multiple hierarchies share the lower levels or if the lower levels are preaggregated before loading into the cube.
With Options: Options that affect the aggregation.
To change a value in the expression syntax:
Click the underlined value in the template.
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 |
|---|---|
![]() |
Reverses the last change (undo). |
![]() |
Reapplies the last change after it is reversed (redo). |
![]() |
Copies the selected text to the clipboard and deletes it from the text area (cut). |
![]() |
Copies the selected text to the clipboard (copy) |
![]() |
Copies the contents of the clipboard to the text area (paste). |
![]() |
Erases the entire contents of the text area. |
![]() |
Formats the aggregation rules for the dimensions into individual lines. |
![]() |
Checks the syntax of the selected text. |
Syntax: Dynamically displays Valid or Invalid for the syntax shown in the text area.
Related Topics