Show TOC

Boolean OperatorsLocate this document in the navigation structure

Use

These are functions that you can use as operators for defining a formula or a calculated key figure.

Features

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.

Tip

Example: Costs < Sales delivers 1 if sales are greater than costs and 0 if costs are greater than or equal to sales.

Logical AND (AND)

<Expression1> AND <Expression2>

The result is 1 if both <Expression1> and <Expression2> do not equal 0. Otherwise the result is 0. Only the numerical values of <Expression1> and <Expression2> are considered, without taking units into account.

Logical OR (OR)

<Expression1> OR <Expression2>

The result is 1 if <Expression1> or <Expression2> does not equal 0. Otherwise the result is 0. Only the numerical values of <Expression1> and <Expression2> are considered, without taking units into account.

Logical Exclusive OR (XOR)

<Expression1> XOR <Expression2>

The result is 1 if either <Expression1> or <Expression2> (but not both) does not equal 0. Otherwise the result is 0. Only the numerical values of <Expression1> and <Expression2> are considered, without taking units into account.

Logical NOT (NOT)

NOT <Expression>

The result is 1 if <Expression> is 0, otherwise the result is 0. Only the numerical value of <Expression> is considered without taking units into account.

LEAF

The result is 0 for results rows or real (inner) nodes of a hierarchy, and the value 1 for elementary rows or the leaves of a hierarchy.

This operator allows you to carry out various calculations on results rows and elementary rows.

Conditional Calculations (IF-THEN-ELSE)

You can make conditional calculations using Boolean operators An expression in the formIF<Logic Expression> THEN <Expression1> ELSE <Expression2> can also be made using a formula in the form<Logic Expression> * <Expression1> + NOT <Logic Expression> * <Expression2>

Tip

Example: 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