Arithmetic Operators in TM1 Rules:
The following mathematical operators can be used when constructing TM1 rules.
| Operator | Meaning |
| + (Plus Sign) | Addition |
| - (Minus Sign) | Substraction |
| * (asterisk) | Multiplication |
| / (forward slash) | DivisionDivision by zero using this operator returns an undefined value. |
| \ (back slash) | DivisionDivision by zero using this operator returns zero. |
| ^ (caret/circumflex) | Exponentiation |
Comparison Operators in TM1 Rules:
You can use the following comparison operators to compare values in the formula portion of a rule calculation statement.
| Operator | Meaning |
| > | Greater than |
| < | Less than |
| >= | Greater than or equal to |
| <= | Less than or equal to |
| = | Equal to |
| <> | Not equal to |
Note: To compare two string values, insert the @ symbol before the comparison operator, as in the following example:
IF ('A' @= 'B',0,1) yields the number 1
Logical Operators in TM1 Rules:
You can combine expressions in a rules calculation statement using logical operators.
| Operator | Meaning | Example |
| & (Ampersand) | AND | (Value1 > 5) & (Value1 < 10) Returns TRUE if the value is greater than 5 and less than 10. |
| % (Percentage sign) | OR | (Value1 > 10) % (Value1 < 5) Returns TRUE if the value is greater than 10 or less than 5. |
| ` (Tilde) | NOT | ~(Value1 > 5) Equivalent to (Value1 <= 5) |
0 comments:
Post a Comment