The following operators are available: plus, minus, timespan, times, divide, abs, div, mod, squareroot, sigma, round.
Addition
XML tag: |
plus |
|
Operands: |
at least two values |
|
Synopsis: |
<plus> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE) |
|
Result: |
Value |
|
Result type: |
Operand data type with identical data type. |
|
Description: |
Adds the values specified in the XML element |
|
Calculation (PPM3) |
Result |
Sum of all operands |
Error |
If at least one operand equals NULL or at least one operand is of a non-numerical data type |
|
Calculation (PPM4) |
Result |
NULL if at least one operand equals NULL, otherwise sum of all operands. |
Error |
Only if the data type is non-numerical |
|
Example: |
- |
Subtraction
XML tag: |
minus |
|
Operands: |
exactly two values |
|
Synopsis: |
<minus> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE) |
|
Result: |
Value (difference) |
|
Result type: |
Operand data type with identical data type. |
|
Description: |
Subtracts value 2 from value 1 |
|
Calculation (PPM3) |
Result |
Result of subtracting operand 2 from operand 1 |
Error |
If at least one operand equals NULL or at least one operand is of a non-numerical data type |
|
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 |
|
Example: |
- |
Time span
XML tag: |
timespan |
|
Operands: |
Exactly two values (points in time) |
|
Synopsis: |
<timespan> |
|
Operands: |
TIME (TIMESTAMP, DATE) |
|
Result: |
Value (time span) |
|
Result type: |
TIMESPAN or |
|
Description: |
Calculates the time difference between time 1 and time 2. If the difference is negative, the value 0 is returned.
|
|
Calculation (PPM3) |
Result |
Time span between operand 1 and operand 2 (operand 1 minus operand 2) |
Error |
If at least one operand equals NULL or at least one is of an invalid data type |
|
Calculation (PPM4) |
Result |
NULL if at least one operand is equal to NULL, otherwise time span between operand 1 and operand 2 (operand 1 minus operand 2) |
Error |
Only if data type is invalid |
|
Example: |
<timespan type="FACTORYCALENDAR" |
If you are using a factory calendar you can also calculate negative time spans by specifying the optional XML attribute negfactorytimespan="TRUE".
Default value: FALSE
You can also perform time span calculations based on external factory calendars by specifying a factory calendar XML file. In the optional directoryname XML attribute, specify the directory containing the factory calendar to be used. The attributename attribute is used to specify the name of the attribute type containing the name of the factory calendar file to be used. The attribute type must be specified for the corresponding object or process instance. The two XML attributes must always be specified together.
Multiplication
XML tag: |
times |
|
Operands: |
at least two values |
|
Synopsis: |
<times> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE) |
|
Result: |
Value (product) |
|
Result type: |
Operand data type with identical data type. |
|
Description: |
Multiplies the values specified in the XML element. |
|
Calculation (PPM3) |
Result |
Result of multiplying operands 1 to n |
Error |
If at least one operand equals NULL or at least one operand is of a non-numerical data type |
|
Calculation (PPM4) |
Result |
NULL if at least one operand is equal to NULL, otherwise result of multiplying all operands |
Error |
Only if the data type is non-numerical |
|
Example: |
- |
Division
XML tag: |
divide |
|
Operands: |
exactly two values |
|
Synopsis: |
<divide> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE) |
|
Result: |
Value (quotient) |
|
Result type: |
Always DOUBLE |
|
Description: |
Divides value 1 by value 2. |
|
Calculation (PPM3) |
Result |
Result of dividing operand 1 by operand 2 |
Error |
If at least one operand equals NULL or at least one operand is of an invalid data type, or operand 2 = 0 |
|
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 |
|
Example: |
- |
Amount
XML tag: |
abs |
|
Operands: |
exactly one value |
|
Synopsis: |
<abs> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE) |
|
Result: |
Value (absolute value) |
|
Result type: |
Operand data type |
|
Description: |
Returns the amount of a value. |
|
Calculation (PPM3) |
Result |
Absolute operand value |
Error |
If an operand equals NULL or is of a non-numerical data type |
|
Calculation (PPM4) |
Result |
NULL if operand equals NULL, otherwise absolute operand value |
Error |
Only if the data type is non-numerical |
|
Example: |
- |
Integer division
XML tag: |
div |
|
Operands: |
exactly two integer values |
|
Synopsis: |
<div> |
|
Operands: |
LONG |
|
Result: |
Integer value of division |
|
Result type: |
LONG |
|
Description: |
Returns the integer value for how often value 2 is contained in value 1. Remainders are ignored. For proper fractions, 0 is returned. |
|
Calculation (PPM4 only) |
Result |
NULL if at least one operand is equal to NULL, otherwise integer result of dividing operand 1 by operand 2 |
Error |
If at least one operand is of an invalid data type (not LONG) or operand 2 = 0 |
|
Example: |
<div> |
Modulo
XML tag: |
mod |
|
Operands: |
exactly two integer values |
|
Synopsis: |
<mod> |
|
Operands: |
LONG |
|
Result: |
Integer remainder |
|
Result type: |
LONG |
|
Description: |
Returns the remainder of an integer division of value 1 by value 2. For proper fractions, the value of the first operand is returned. If value 1 = value 2, 0 is returned. |
|
Calculation (PPM4 only) |
Result |
NULL if at least one operand is equal to NULL, otherwise remainder of integer division of operand 1 by operand 2 |
Error |
If at least one operand is of an invalid data type (not LONG) or operand 2 = 0 |
|
Example: |
<mod> |
Square root
XML tag: |
squareroot |
|
Operands: |
exactly one value |
|
Synopsis: |
<squareroot> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE, and user-defined types, e.g., COST) |
|
Result: |
Square root |
|
Result type: |
DOUBLE data type |
|
Description: |
Calculates the square root of the value entered. |
|
Calculation (PPM4 only) |
Result |
NULL if the operand equals NULL, otherwise the square root of the numeric operand |
Error |
If the operand has an invalid data type (not numerical) or if the value of the operand is less than 0 |
|
Example: |
- |
Six Sigma value
The Six Sigma value is a quality management measure (Six Sigma method). The measure value indicates the degree to which the process is error-free.
XML tag: |
sigma |
|
Operands: |
exactly one value |
|
Synopsis: |
<sigma> |
|
Operands: |
Numerical data types (LONG, DOUBLE, TIMESPAN, FACTORYTIMESPAN, FREQUENCY, PERCENTAGE, and user-defined types, e.g., COST) |
|
Result: |
Six Sigma value |
|
Result type: |
DOUBLE data type |
|
Description: |
Calculates the Six Sigma value using the following formula: Sigma (x) = p quantile (x) +1.5 In PPM, the percentile (p quantile) is calculated using the method developed by P. Griffiths and I.D. Hill: Applied Statistics Algorithms. |
|
Calculation (PPM4 only) |
Result |
NULL if the operand equals NULL; |
Error |
If operand has an invalid data type (not numerical) |
|
Example: |
- |
Round
XML tag: |
round |
|
Operands: |
A single value of the TIMESPAN type |
|
Synopsis: |
<round> |
|
Operands: |
TIMESPAN |
|
Result: |
Rounded time span value |
|
Result type: |
TIMESPAN |
|
XML attributes |
scale (MINUTE|HOUR|DAY|WEEK|MONTH|YEAR) roundingkind (ROUND|FLOOR|CEIL) "ROUND" |
|
Description: |
Returns the rounded value for time spans. Only values of the TIMESPAN data type can be rounded. The scale to be used for rounding must be specified. The following rounding methods exist: ROUND (decimal places < 5 rounded down, >= 5 rounded up) |
|
Calculation (PPM4 only) |
Result |
The rounded value in the specified scale. |
Error |
If operand is of an invalid data type or an invalid number of operands. |
|
Example: |
<round scale="MINUTE" roundingkind="CEIL"> The time span value 1.19 hours is converted to 71.4 minutes as specified by the scale and is rounded up to 72 minutes (return value) in line with the specified rounding method. |
Null value
XML tag: |
nullvalue |
|
Operands: |
exactly two values |
|
Synopsis: |
<nullvalue> |
|
Operands: |
Any data type, both operands must be of the same data type. |
|
Result: |
Value of the first operand if it is not null, otherwise value of the second operand |
|
Result type: |
Operand data type |
|
Description: |
Replaces the possibly missing value of the first operator (value null) with the value of the second operator. If the first operand supplies a value, this value will be returned, otherwise the value of the second operand will be returned. |
|
Calculation (PPM4 only) |
Result |
Value of the first operand if it is not null, otherwise value of the second operand. |
Error |
When operands have different data types |
|
Example: |
<nullvalue> <subtext beginindex="3"> <filteredattribute name="AT_XYZ" </subtext> <constant> <dataitem> ABC <datatype name="TEXT">Text</datatype> </dataitem> </constant> </nullvalue> If the subtext operator does not return any value, the constant character string ABC is returned. |