Aggregation and Exception Aggregation

Aggregation is a process to summarize measures, for example, by grouping values of multiple rows into a single result.

The standard aggregation is used to aggregate with respect to any dimension not in query drill-down. Exception aggregation is always performed in addition to standard aggregation. It defines the exception: It is used to aggregate with respect to the defined dimensions for exception aggregation. You can use exception aggregation if warehouse stock cannot be totaled up at the time, or if counters count the number of dimension members for a specific dimension.

A measure is calculated in the following order: first the standard aggregation, then the formula, and then the exception aggregation.

Examples

Calculate Stock

You want to calculate the stock at the beginning of a month and the end of the month. You can do that by creating two measures: one with different exception aggregation behavior First and one with exception aggregation behavior Last.

With exception aggregation First, only the value of the first day in the month is taken and with exception aggregation Last, only the value of the last day in the month is taken.

Count Number of Customers Within a Year

Count Number of Customers per Year (2022)

NetAmount 2022

Number of Customers in 2022

Average NetAmount per Customer

Colorado

55,871.75 $

35

1,596.34 $

Conneticut

7,924.00 $

5

1,584.80 $

Delaware

35,217.10 $

7

5,031.01 $

Florida

10,634.35 $

14

759.60 $

Florida

47,895.40 $

25

1,915.82 $

Florida

582.85 $

1

582.85 $

Maryland

1,521.15 $

4

380.29 $

Pennsylvania

53,748.20 $

23

2,336.88 $

The above query shows the companies, revenue of 2022 in combination with the number of customers within this year. The special aspect here is, that the "counting of the customers" does not need to have the CUSTOMER dimension itself within the current result set. The aggregation is done over exception aggregation and over the exception aggregation dimension CUSTOMER for the counting. This allows you to leave the dimension CUSTOMER out of the result set. Based on this you can have further analysis, e.g. with a formula which calculates the average revenue per customer in the year.