This section explains the basic rules that the system uses to calculate zero values and other special values into formulae.
See SAP Note 794006 for more details.
The following special values are explained:
ZERO represents the value zero;
DIV0 is the result of a division by 0;
ERROR displays an error;
NOP displays that no aggregation is possible.
W stands for a valid value and * for a value;
O1 is a unary operator (such as NODIM, NOERR)
O2 is a binary operator (wie +, -, *)
NOP is the result of aggregations NO1, NO2, and NOP (see Aggregation and Special Values). As the result of an operation (or a non-homogeneous value set) NOP has lost its place between ZERO and ERROR in the following priority rule.
ERROR/DIV0
NOP
ZERO or a normal value depending on the operation.
The following rules apply for formulae:
|
In the BW system, the OLAP processor behaves in such a way that adding a structure element does not also have to mean a change to the content of all other structure elements. The OLAP processor also therefore handles a division by zero without canceling the query immediately. If a cell also contains a division by zero or another error, the other cells do not need to be affected.
As DIV0 is a special type of ERROR, DIV0 and ERROR behave in the same way when they are combined with other paramter values in operations. The bahvaior of DIV0 and ERROR in binary operations is unspecific and depends on the binary operation O2:
O2(DIV0, ERROR) = DIV0 or ERROR
O2(ERROR, DIV0) = DIV0 or ERROR
DIV0 is more specific and can therefore get the priority before ERROR. But the behavior is not defined uniquely.
The following table gives an overview of the behavior and all rules:
Operator |
Left Operand |
Right Operand |
|||
---|---|---|---|---|---|
+, - |
Y |
ZERO |
NOP |
DIV0 / ERROR |
|
X |
X or Y |
X |
NOP |
DIV0 / ERROR |
|
ZERO |
Y (-Y) ZERO + Y results in Y ZERO - Y results in -Y. |
ZERO |
|||
NOP |
NOP |
||||
DIV0 / ERROR |
DIV0 / ERROR |
||||
* |
X |
X or Y |
ZERO |
NOP |
|
ZERO |
ZERO |
ZERO |
|||
NOP |
NOP |
||||
DIV0 / ERROR |
DIV0 / ERROR |
||||
/, DIV, MOD |
X |
X or Y if Y = 0, the result is DIV0. |
DIV0 |
NOP |
|
ZERO |
ZERO |
ZERO |
|||
NOP |
NOP if Y = 0, the result is DIV0. |
DIV0 |
|||
DIV0 / ERROR |
DIV0 / ERROR |
||||
High (**) |
X |
X ** Y |
1 |
NOP |
|
ZERO |
ZERO |
ZERO |
|||
NOP |
NOP |
||||
DIV0 / ERROR |
DIV0 / ERROR |
||||
%, %_A, %_RT, %_GT, %_CT |
X |
X or Y |
X op 0 |
NOP |
|
ZERO |
ZERO |
ZERO |
|||
NOP |
NOP |
||||
DIV0 / ERROR |
DIV0 / ERROR |
||||
Other operations, such as MIN, MAX |
X |
X or Y |
X op 0 |
NOP |
|
ZERO |
0 op Y |
ZERO |
|||
NOP |
NOP |
||||
DIV0 / ERROR |
DIV0 / ERROR |