Show TOC

Background documentationAggregation and Special Values Locate this document in the navigation structure

 

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 Example

Value Sets with Special Values

V8 = { (R2D2, 28 €) (Palpatine, 0€), (Boba, NULL), (Ackbar, 122$), (Jabba, DIV0) }

AVG(V8) = ???

End of the example.

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:

Special Values in the Order of their Inclusion
  1. ERROR: This special value is the result of an incorrect calculation, such as, division by 0 (DIV0).

  2. NOP: This special value is the result of the aggrgation rules NO1, NO2, and NOP. An aggregation could not be executed.

  3. *: This symbol represnts a valid value.

  4. ZERO: This special value means that no value exists.

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:

Special Values ERROR and NOP
  • An aggregation that returns the special value ERROR for the set {*, ZERO, ERROR}, also returns the special value NOP for the set {*, ZERO, NOP} , however it returns the special value ERROR for the set {*, ZERO, NOP, ERROR}.

  • An aggregation that does not return the special value ERROR for the set {*, ZERO, ERROR}, also does not return the special value NOP for the set {*, ZERO, NOP}. Examples for this are the aggregation rules CN0, AV0, FIRST, LAS, and CNT.

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).

Aggregation Matrix Part 1

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

Aggregation Matrix Part 2

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

*

Aggregation Matrix Part 3

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