Aggregation and Special Values 
The aggregation rules outlined in the previous sections produce unique results for value sets with valid values. There are also more complex value sets that contain special values such as 0, zero, or DIV0.
The following example shows that a value set of this kind does not lead to a unique result based on the previous rules.
Example
V8 = { (R2D2, 28 €) (Palpatine, 0€), (Boba, NULL), (Ackbar, 122$), (Jabba, DIV0) } AVG(V8) = ??? |
The following explains the different combinations for exception aggregation rules (AVG, AV0, and so on) and special value sets (for example, { 0€ }, { 0€, DIV0 }, { 42€, 13$ }, { 0€, DIV0, 42€, 13$ } ) and the results that they produce. Firstly, the special behavior and results of the standard and exception aggregations for basis key figures are described as well as for calculated and restricted key figures (known as formula exception aggregation). These aggregation rules are then compared with different value sets that contain the values which appear in the special situations (for example, ERROR or mixed currencies).
There are the following types of special values that have to be included in value sets:
|
The order of this list corresponds to the priority with which the OLAP processor includes the special values in an aggregation: Firstly ERROR, then NOP, then *, and finally ZERO.
Special value NOP is handled like ERROR so that the following rules apply:
|
The following tables apply the priority rules to some example sets (in the columns) and show the different aggregation rules (in the rows). For the sake of charity, the characteristic names are left out of the example sets. The special exception rules AV1, average (weighted with number of days), and AV2, average (weighted with number of working day; factory calendar) are not displayed: As the value sets that are displayed do not have any reference to a time characteristic, AV1 and AV2 behave like AVG. (For the hierarchy exception aggregations NHA and NGA see Hierarchy Exception Aggregations NGA and NHA).
B={ ZERO } |
C={ 0€ } |
D={ DIV0 } |
E={ 42€ } |
F={ 0€, DIV0 } |
G={ 0€, 13$ } |
|
|---|---|---|---|---|---|---|
AVG |
ZERO |
0 € |
DIV0 |
42 € |
DIV0 |
6,5 $ |
AV0 |
ZERO |
0 € |
ZERO |
42 € |
0 € |
13 $ |
CNT |
ZERO |
1 |
1 |
1 |
2 |
2 |
CN0 |
ZERO |
0 |
0 |
1 |
0 |
1 |
FIR |
ZERO |
0 € |
DIV0 |
42 € |
0 € |
0 € |
LAS |
ZERO |
0 € |
DIV0 |
42 € |
DIV0 |
13 $ |
MAX |
ZERO |
0 € |
DIV0 |
42 € |
DIV0 |
13 $ |
MIN |
ZERO |
0 € |
DIV0 |
42 € |
DIV0 |
0 € |
NO1 |
ZERO |
0 € |
DIV0 |
42 € |
DIV0 |
NOP |
NO2 |
ZERO |
0 € |
DIV0 |
42 € |
DIV0 |
NOP |
NOP |
ZERO |
0 € |
DIV0 |
42 € |
DIV0 |
13 $ |
STD |
ZERO |
0 € |
DIV0 |
0 |
DIV0 |
9,192 $ |
SUM |
ZERO |
0 € |
DIV0 |
42 € |
DIV0 |
13 $ |
VAR |
ZERO |
0 |
DIV0 |
0 |
DIV0 |
84,5 |
H={DIV0, 42€ } |
I={ 42€, 13$ } |
J={ 42€, -13$ } |
K={ 0€, DIV0, 13$ } |
L={ 0€, 42€, 13$ } |
|
|---|---|---|---|---|---|
AVG |
DIV0 |
* |
* |
DIV0 |
* |
AV0 |
42 € |
* |
* |
13 $ |
* |
CNT |
2 |
2 |
2 |
3 |
3 |
CN0 |
1 |
2 |
2 |
1 |
2 |
FIR |
DIV0 |
42 € |
42 € |
0 € |
0 € |
LAS |
42 € |
13 $ |
– 13 $ |
13 $ |
13 $ |
MAX |
DIV0 |
* |
42 € |
DIV0 |
* |
MIN |
DIV0 |
* |
– 13 $ |
DIV0 |
0 € |
NO1 |
DIV0 |
NOP |
NOP |
DIV0 |
NOP |
NO2 |
DIV0 |
NOP |
NOP |
DIV0 |
NOP |
NOP |
DIV0 |
NOP |
NOP |
DIV0 |
NOP |
STD |
DIV0 |
* |
* |
DIV0 |
* |
SUM |
DIV0 |
* |
* |
DIV0 |
* |
VAR |
DIV0 |
* |
* |
DIV0 |
* |
M={ NOP } |
N={ 0€, NOP } |
O={ NOP, 13$ } |
P={ DIV0, NOP, 13$ } |
|
|---|---|---|---|---|
AVG |
NOP |
NOP |
NOP |
DIV0 |
AV0 |
ZERO |
ZERO |
13 $ |
13 $ |
CNT |
1 |
2 |
2 |
3 |
CN0 |
0 |
0 |
1 |
1 |
FIR |
NOP |
0 € |
NOP |
DIV0 |
LAS |
NOP |
NOP |
13 $ |
13 $ |
MAX |
NOP |
NOP |
NOP |
DIV0 |
MIN |
NOP |
NOP |
NOP |
DIV0 |
NO1 |
NOP |
NOP |
NOP |
DIV0 |
NO2 |
NOP |
NOP |
NOP |
DIV0 |
NOP |
NOP |
NOP |
NOP |
DIV0 |
STD |
NOP |
NOP |
NOP |
DIV0 |
SUM |
NOP |
NOP |
NOP |
DIV0 |
VAR |
NOP |
NOP |
NOP |
DIV0 |