Using STET and CONTINUE in TM1 Rules
Stet and Continue allow us to ignore the current intersection or to continue down the rules to find the next rule that applies. To do this, we would typically create a rule with the syntax of if something is true, then continue processing, otherwise ignore. 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. If not, then Stet (skip) this intersection.
Why would we use Stet and Continue?
One of the primary uses of the Stet function is to determine if a Rule is to be applied. So, if for example, you have multiple scenarios but want rules to be applied to two, then a rule like:
 = IF (!p_Scenario @= 'Current Forecast' % !p_Scenario @= 'Current Budget' , CONTINUE, STET);
Stet and Continue allow us to achieve that result. They limit the code that needs to be entered against every subsequent rule so that only Current Forecast and Current Budget will be impacted by the following rules.
Another example is:
['Forecast'] = IF ( ['Act/Fcst'] = 1 , ['Actual'] , CONTINUE );
Here we are assessing if the Act/Fcst flag is a 1 (which represents Actuals). If so, we are bringing the values from the Actual element in the version dimension through to the Forecast element. If the flag is not 1 (ie not an historic period), then CONTINUE. This will mean we could then set up a rule further below to calculate the forecast.
Dynamically Updating Rules
Using Stet and Continue in this way, we can write rules specific to an explicit element or hierarchy. We are then confiedent that the rule will dynamically update when new elements are added to the hierarchy.
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!