Do you need to create an IF expression in a TM1 rule with a logical operator? To create something that is like an AND or OR from SQL but do it in a Rule? Look no further!
If, however, you are looking for IF operators for a Turbo Integrator process, please check this post.
TM1 Rule Operators
There are some very useful operators available in TM1 Rules. Use
- For OR, use a percent sign: %
- For AND, use and ampersand: &
Here is an example of creating a rule that uses the & operator to check if multiple elements are zero and if so, return a 0 and otherwise return a 1.
['Below Meet or Exceed'] = C:
IF ( ( ['Exceeds Standard'] = 0 & ['Meets Standard or No Activity'] = 0 & ['Below Standard'] = 0)
This says that if the elements Exceeds Standard, Meets Standard or No Activity or Below Standard are all equal to zero, then set the consolidation of Below Meet or Exceed to 0 and if any of them is not equal to zero, then return 1.