Boolean operators are functions that you can use as operators for defining a formula or a calculated key figure.
The following functions are supported:
Operator |
Operator Name |
Description |
---|---|---|
<, <=, <>, ==, >, >= |
Relational Operators |
<Expression1> <Operator> <Expression2> The result is 1 if the relationship denoted by <Operator> between expression <Expression1> and <Expression2> holds (that is <Expression> <Operator> <Expression2> is true), otherwise the result is 0. Only numerical values of <Expression1> and <Expression2> are compared without taking units into account. |
AND |
Logical AND |
<Expression1> AND <Expression2> The result is 1 when <Expression1> and <Expression2> (both) are not equal to 0, otherwise it is 0. Only the number values of <Expression1> and <Expression2> are considered without consideration of the unit. |
OR |
Logical OR |
<Expression1> OR <Expression2> The result is 1 if <Expression1> or <Expression2> is not equal to 0, otherwise it is 0. Only the number values of <Expression1> and <Expression2> are considered without consideration of the unit. |
XOR |
Logical Exclusive OR |
<Expression1> XOR <Expression2> The result is 1 if either <Expression1> or <Expression2> (but not both) is not equal to 0, otherwise it is 0. Only the number values of <Expression1> and <Expression2> are considered without consideration of the unit. |
NOT |
Logical NOT |
NOT <Expression> The result is 1 if <Expression> has the result 0, otherwise it is 0. Only the number value of <Expression> is considered without the unit. |
LEAF |
Leaf |
If the result is 0 on the results line, or the real (inner) node of a hierarchie, and value 1 on the elementary line or pages of a hierarchy. With this operator you can execute different calculations on results lines and elementary lines. |
IF-THEN-ELSE |
Conditional Calculations |
Boolean operators can be used to perform conditional calculations. An expression in the IF form <Logic Expression> THEN <Expression1> ELSE <Expression2> can be equivalently realized by a formula in the form <Logic Expression> * <Expression1> + NOT <Logic Expression> * <Expression2> |
Relational Operators (<, <=, <>, ==, >, >=)
'Costs' < 'Revenue' returns 1 if the revenue is greater than the costs and 0 if the costs are greater or equal to the revenue.
Conditional Calculations (IF-THEN-ELSE)
IF 'Actual Costs' > 'Plan Costs' THEN 'Plan Costs' + 'Plan Deviation' ELSE 'Actual Costs'
can be written as the following formula:
('Actual Costs' > 'Plan Costs')* ('Plan Costs' + 'Plan Deviation') + (NOT ('Actual Costs' > 'Plan Costs')) * 'Actual Costs'
or
('Actual Costs' > 'Plan Costs')* ('Plan Costs' + 'Plan Deviation') + ('Actual Costs' <= 'Plan Costs)) * 'Actual Costs'