Rules
  • 13 Jun 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Rules

  • Dark
    Light

Article summary

Rules are sets of formulas defined on members of the same Entity. Rules can be created under the Rules section of a Data model. 

Using a Rule, it is possible to define a specific member as the result of a formula involving other members of the same Entity, regardless of any Selection that may be active on that Entity.

A Rule is always associated with a single Entity and can be used with (or applied to) all Cubes that have that Entity as a dimension in their structure.

The selected rule is always applied to the values of the previous Data Block in the list, taking into account only the most-nested Entity in the Axes area (i.e. the one in the rightmost position in the "By Row" or "By Column" field). Rules, therefore, cannot be the first Data Block in the list (Block "a"), and in order for them to work, they need to be used in a Layout with their associated Entity set By Row or By Column.
If the Entity is set By Row, it is possible to add another Entity in the same axis as a grouping Entity (i.e. the one in the leftmost position in the "By Row" field). Those Entities must not be part of the same hierarchy. It is not possible to add another Entity By Column when the Entity that is defined by the Rule is set By Column. Read more here.

Example
If a Rule is defined on the Entity "ProfitAndLoss" and you want to use it in a Layout, you have to set the Entity By Column or By Row. If you set it By Row, you can add another unrelated Entity, for example the Entity "Month", and add it as the first Entity in the "By Row" field as shown below.
contents/assets/images/rules.layout.example.png

Rules can be added from the Data panel of the Layout editor, in the "More" subpage. To understand the basic concepts about Rules, read Rules basic concepts.

contents/assets/images/rules.layout.editor.PNG



Was this article helpful?