Did you know that rules are used in TM1 to perform live calculations without the need for any manual intervention or on-demand scripts? This is a very powerful aspect of Planning Analytics and, when used properly, increase the value of the tool for your users.
There are some aspects of rules that I often see people forgetting. Here are some friendly reminders about how to use these components properly:
TM1 offers two different approaches to write a division formula via the “slash”. Not only do I often forget the difference between the two slashes, but I also sometimes forget the names of each slash.
The forward slash; goes bottom left to top right
Division by zero using this operator returns an undefined value
The back slash; goes top left to bottom right
Division by zero using this operator returns zero
TM1 allows for mathematical comparison of numbers using standard nomenclature such as =, >, < and <>. However, TM1 also offers the ability to compare strings via the same functionality. You can compare strings by simply adding an @ symbol to the nomenclature.
Numeric check: IF ( numValue = numCounter )
String check: IF ( strValue @= strCounter )
And, Or, Not
When writing comparisons, we often use the AND concept and the OR concept. AND is written by using the ampersand symbol ( & ) and OR is written by using the percent symbol ( % ). But did you know that you can also write NOT by using the tilde ( ~ ).
~( x = 5 ) is the same as writing ( x <> 5 )
Rules are a very powerful component of Planning Analytics. Hopefully these components help you continue creating efficient code.
IBM Planning Analytics, which TM1 is the engine for, is full of new features and functionality. Not sure where to start? Our team here at Revelwood can help. Contact us for more information at firstname.lastname@example.org. And stay tuned for more Planning Analytics Tips & Tricks weekly in our Knowledge Center and in upcoming newsletters!
Learn more IBM Planning Analytics Tips & Tricks:
Need more guidance? Take a look at our IBM Planning Analytics Training services and our Customer Care Program.