Nesting of operators

Operators can be nested at any depth. If you are combining operators, you need to adhere to the rules specified in the DTD.

Warning

Calculation rules based on nesting of operators that is not permitted result in the import being canceled when the measure configuration is imported. Due to the complex dependencies, incorrect calculation rules may result in the database content being entirely unusable.

In the file KeyindicatorConfiguration.dtd in the dtd directory of your PPM installation, you can check what nesting of operators is permitted.

Example (extract from DTD):

<!ELEMENT abs (%numericoperator; | %setoperator; |

%caseoperator; | filteredattribute | constant)>

The <abs> operator can be nested with one of the <filteredattribute> or <constant> XML elements or with an operator for the specified entities (declared units in XML notation to which particular XML elements are assigned):

Which operators are assigned to which entity can be seen in the declaration of the entity.

Example (extract from DTD):

<!ENTITY % setoperator "sum|product|card|min|max|mean">

The % setoperator entity stands for one of the operators <sum>, <product>, <card>, <min>, <max>, or <mean>.

The following example shows a calculation rule compliant to the DTD:

<calcattr name="..." type="...">

<calculation>

<abs>

<minus>

<filteredattribute name="AT_KI_BSP1"

nodetype="OT_FUNC" objectname="this"

filter="LATEST" onerror="EXIT_NO_WARNING"/>

<filteredattribute name="AT_KI_BSP2"

nodetype="OT_FUNC" objectname="this"

filter="EARLY" onerror="EXIT_NO_WARNING"/>

</minus>

</abs>

</calculation>

</calcattr>