Comments, Formatting, and Restrictions
This article focuses on rule readability and execution control. It covers how to use comments and formatting in rules, and explains how cell type restrictions can be applied to limit rule calculations to base cells or consolidated cells. Furthermore, it describes how rule targets are defined and restricted across dimensions.
Comments and formatting
You can add inline comments to your rules to help other users understand their structure and logic. Inline comments can be added with // and block comments can be added with /* … */ (see green text in screenshot below). All comments and formatting persist after the rule is stored in the In-Memory DB.
Cell Type Restriction
Cell type restrictions can be either C: or B: (N: in older versions). If not specified, the rule is enabled for all cells of the target area. C: enables the rule only for cells with a pure consolidated element in at least one dimension, those with no string element in any dimension or under any of the consolidated elements. B: enables the rule for base cells only, i.e., cells with a base element in every dimension. Consolidated values will be calculated as the aggregation of the rule-calculated base cells.
Note that consolidated string elements are treated like base elements by the Rules Engine.
Examples:
If a rule is to apply to base elements only (consolidated elements will be aggregated as usual), the target area may be defined as follows:
[Target]=B: f[Source]
Vice versa, it is also possible to restrict the target area to consolidated elements.
[Target]=C: f[Source]
To build on the examples we used earlier, change RULE 1 and RULE 2 as follows:
['2015'] = B:123 ['2015','Desktop L'] = B:['2013'] * 1.1
Multiple dimension restrictions in rule target and cell references
The Rule Editor does not allow a dimension to be restricted multiple times in one rule.
For example:
['Year':'2019', 'Year':'2020'] = ['Year':'2018']
or
['Year':'2019', 'Year':{'2020','2021'}] = ['Year':'2018']
are not allowed in the Rules Editor, because of double restriction in the Year dimension. The rule target can be restricted to more than one element, but only once, e.g.:
['Year':{'2019','2020','2021'}] = ['Year':'2018']
Next Step:Dimensions, Rule Targets, and Empty strings
Updated March 9, 2026
