Available operators
Operators link individual operands in a calculation rule, can be linked with each other and nested in any depth.
The following operators are available for defining user-defined measures.
Name:
Addition
Description:
Creates the sum of all elements in the set of values.
Operands:
Exactly one set of values
Operand type:
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, PERCENTAGE)
Result:
Value
Result type:
Data type of set of values used, for mixed data types within set always DOUBLE
Calculation (PPM4):
Result
Sum of values contained in the set of values.
NULL if the transferred set is empty.
Error
If at least one element in the set of values is of an invalid data type.
Name:
Condition check with optional branch (else)
Description:
Checks a condition
Operands:
Exactly one logical value
Operand type:
BOOLEAN
Result:
Logical value - Value [- Value]
Result type:
BOOLEAN - Operand data type [- Operand data type]
Calculation (PPM4):
Result
Value of second operand if the first operand returns TRUE. Value of the 3rd operand if the 1st operand returns FALSE.
NULL if 1st operand is FALSE and 3rd operand is not defined.
Error
If first operand is not of the BOOLEAN data type
Name:
Amount
Description:
Returns the amount of a value
Operands:
Exactly one value
Operand type:
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, PERCENTAGE)
Result:
Value (amount)
Result type:
Operand data type
Calculation (PPM4):
Result
NULL if operand equals NULL, otherwise absolute operand value
Error
Only if the data type is non-numerical
Name:
Division
Description:
Divides value 1 by value 2
Operands:
Exactly two values
Operand type:
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, PERCENTAGE)
Result:
Value (quotient)
Result type:
Always DOUBLE
Calculation (PPM4):
Result
NULL if at least one operand is equal to NULL, otherwise result of dividing operand 1 by operand 2
Error
If at least one operand is of an invalid data type or operand 2 = 0
Name:
Existence
Description:
Returns TRUE if the specified attributes exist, regardless of whether any values are assigned to the attributes.
Operands:
At least one attribute name (attribute, filteredattribute)
Operand type:
All data types
Result:
Logical value
Result type:
BOOLEAN
Calculation (PPM4):
Result
TRUE if all specified attributes exist, otherwise FALSE
Error
None
Name:
Equality (value)
Description:
Equality of all specified values returns TRUE
Operands:
At least two values
Operand type:
All data types
Result:
Logical value
Result type:
BOOLEAN
Calculation (PPM4):
Result
TRUE if operands 1 to n have the same data type and value, otherwise FALSE. NULL if one operand is NULL.
Error
None
Name:
"Greater than" comparison
Description:
Compares two values for inequality
Operands:
Exactly two values
Operand type:
Uniform numerical data type
Result:
Logical value
Result type:
BOOLEAN
Calculation (PPM4):
Result
TRUE if value 1 is greater than value 2 and the operands are of a uniform data type, otherwise FALSE.
NULL if at least one operand equals NULL.
Error
Only if data type is invalid.
Name:
"Less than" comparison
Description:
Compares two values for inequality
Operands:
Exactly two values
Operand type:
Uniform numerical data type
Result:
Logical value
Result type:
BOOLEAN
Calculation (PPM4):
Result
TRUE if operand 1 and operand 2 are of the same data type and operand 1 is less than operand 2, otherwise FALSE.
NULL if at least one operand equals NULL.
Error
Only if data type is invalid
Name:
Logical EXCLUSIVE OR
Description:
Links multiple logical values with XOR
Operands:
At least two logical values
Operand type:
BOOLEAN
Result:
Logical value
Result type:
BOOLEAN
Calculation (PPM4):
Result
TRUE if exactly one operand returns TRUE.
FALSE if no operand or more than one operand returns TRUE.
NULL if one operand returns NULL.
Error
If at least one operand is of an invalid data type (not BOOLEAN)
Name:
Logical NOT
Description:
Reverses the specified logical value
Operands:
Exactly one logical value
Operand type:
BOOLEAN
Result:
Logical value
Result type:
BOOLEAN
Calculation (PPM4):
Result
TRUE if operand returns FALSE.
FALSE if operand returns TRUE.
NULL if the operand returns NULL
Error
If operand is of an invalid data type (not BOOLEAN)
Name:
Logical OR
Description:
Links multiple logical values with OR
Operands:
At least two logical values
Operand type:
BOOLEAN
Result:
Logical value
Result type:
BOOLEAN
Calculation (PPM4):
Result
TRUE if one operand returns TRUE and all preceding ones do not return NULL.
FALSE if all operands return FALSE.
NULL if one operand returns NULL and all preceding operands return FALSE.
Error
If at least one operand is of an invalid data type (not BOOLEAN)
Name:
Logical AND
Description:
Links multiple logical values with AND
Operands:
At least two logical values
Operand type:
BOOLEAN
Result:
Logical value
Result type:
BOOLEAN
Calculation (PPM4):
Result
TRUE if all operands return TRUE. FALSE if one operand returns FALSE and all preceding operands return TRUE. NULL if one operand returns NULL and all preceding operands return TRUE.
Error
If at least one operand is of an invalid data type (not BOOLEAN)
Name:
Maximum
Description:
Returns the highest value of the set of values
Operands:
Exactly one set of values
Operand type:
Numerical data types and TIME (TIMESTAMP, DATE), DAY, TIMEOFDAY, FREQUENCY
Result:
Value
Result type:
Data type of set of values
Calculation (PPM4):
Result
NULL if the set of values is empty
Error
None
Name:
Minimum
Description:
Returns the smallest value in the set of values
Operands:
Exactly one set of values
Operand type:
Numerical data types and TIME (TIMESTAMP, DATE), DAY, TIMEOFDAY, FREQUENCY
Result:
Value
Result type:
Data type of set of values
Calculation (PPM4):
Result
NULL if the set of values is empty.
Error
None
Name:
Multiplication
Description:
Creates the product of all elements in the set of values.
Operands:
Exactly one set of values
Operand type:
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, PERCENTAGE)
Result:
Value
Result type:
Data type of set of values used, for mixed data types within set always DOUBLE
Calculation (PPM4):
Result
Multiplication of values contained in the set of values.
NULL if the transferred set is empty.
Error
If at least one element in the set of values is of an invalid data type.
Name:
Square root
Description:
Calculates the square root of a number
Operands:
One operand
Operand type:
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, PERCENTAGE)
Result:
Numerical value
Result type:
Operand data type
Calculation: (PPM4):
Result
NULL if operand is equal to NULL
One if the operand equals one; result of square root calculation if operand is > 1
Error
If operand is of an incorrect data type (not numerical) or operand < 0
Name:
Subtraction
Description:
Subtracts value 2 from value 1
Operands:
Exactly two values
Operand type:
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, PERCENTAGE)
Result:
Value (difference)
Result type:
Operand data type with identical data type.
DOUBLE for mixed numerical data types that, in this case, are automatically converted to DOUBLE.
Calculation (PPM4):
Result
NULL if at least one operand is equal to NULL, otherwise result of subtracting operand 2 from operand 1
Error
Only if the data type is non-numerical