Using STET and CONTINUE in TM1 Rules
Often we want to tell TM1 to ignore this cell and move onto the next cell if a certain condition is met (or not met). To do this we would typically create a rule with the syntax of if x is true, then continue processing, otherwise ignore this cell. Stet and Continue allow us to have this flexibility.
Example of Stet and Continue in a TM1 Rule
[ ] = N: IF ( ELISANC ( 'Cost Centre', 'BMFA', !CostCentre ) = 1, CONTINUE, STET );
This use of STET and CONTINUE is saying that if when assessing the dimension ‘Cost Centre’ the current Cost Centre is a child of the element ‘BMFA’, then Continue to process rules and if not, then Stet (skip) this intersection.
Why would we use it?
One of the primary uses of this function is to determine if the Rules are to be applied or not. So, if for example, you have multiple scenarios but only want rules to be applied to ‘Current Forecast’ and ‘Current Budget’, then a rule like:
[] = IF (!p_Scenario @= 'Current Forecast' % !p_Scenario @= 'Current Budget' , CONTINUE, STET);
This would allow us to achieve that result, thus limiting the code that needs to be entered against every subsequent rule.
Using an Attribute or Control Cube in a Stet Rule
On this post, we have a great discussion about using either an attribute on the Version dimension or a simple cube to control which versions have rules enabled or disabled. Check it out!
Need help with TM1?
We're here for you