Home > About Advanced Aggregation ... > What Is Aggregation?
![]() Previous |
![]() Next |
Aggregation is the process of consolidating multiple values into a single value. For example, data can be collected on a daily basis and aggregated into a value for the week, the weekly data can be aggregated into a value for the month, and so on. Aggregation allows patterns in the data to emerge, and these patterns are the basis for analysis and decision making. When you define a data model with hierarchical dimensions, you are providing the framework in which aggregate data can be calculated.
Aggregation is frequently called summarization, and aggregate data is called summary data. While the most frequently used aggregation operator is Sum, there are many other operators, such as Average, First, Last, Minimum, and Maximum. Oracle OLAP also supports weighted and hierarchical methods. Following are some simple diagrams showing how the basic types of operators work. For descriptions of all the operators, refer to "Aggregation Operators" .
Figure: Summary Aggregation in a Simple Hierarchy shows a simple hierarchy with four children and one parent value. Three of the children have values, while the fourth is empty. This empty cell has a null or NA
value. The Sum operator calculates a value of (2 + 4 + 6)=12 for the parent value.
Summary Aggregation in a Simple Hierarchy
The Average operator calculates the average of all real data, producing an aggregate value of ((2 + 4 + 6)/3)=4, as shown in Figure: Average Aggregation in a Simple Hierarchy.
Average Aggregation in a Simple Hierarchy
The hierarchical operators include null values in the count of cells. In Figure: Hierarchical Average Aggregation in a Simple Hierarchy, the Hierarchical Average operator produces an aggregate value of ((2 + 4 + 6 +NA)/4)=3.
Hierarchical Average Aggregation in a Simple Hierarchy
The weighted operators use the values in another measure to generate weighted values before performing the aggregation. Figure: Weighted Sum Aggregation in a Simple Hierarchy shows how the simple sum of 12 in Figure: Summary Aggregation in a Simple Hierarchy changes to 20 by using weights ((3*2) + (2*4) + (NA*6) +(4*NA)).
Weighted Sum Aggregation in a Simple Hierarchy