--- title: "Use of Rules in Board Layouts" slug: "use-of-rules-in-layouts" description: "See how to add Rules to a Board Layout as Data Blocks, control calculation scope and aggregation, combine with Algorithms and Rankings, and optimize performance for analysis." tags: ["Algorithm", "By Column", "By Row", "Developer", "Layout", "Rule", "Time Functions"] updated: 2025-11-05T07:52:50Z published: 2025-11-05T07:52:50Z canonical: "help.board.com/use-of-rules-in-layouts" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.board.com/llms.txt > Use this file to discover all available pages before exploring further. # Use of Rules in Layouts This topic describes how to use Rules in a [Layout definition](/v14/docs/configure-a-layout). Rules are usually used in reports, and can be applied to any Cube. This Cube has to contain the Entity (as dimension) on which the Rule was defined. The Rule calculation occurs on the fly during the Layout execution, meaning that the results of Algorithms are not stored in the Data Model. If the view on the Cube is at a summary level, the Rule formulas are calculated after data has been aggregated to the required view level. This allows you to correctly calculate percentages and other values that are not the result of additions and therefore cannot be summed. This process is similar to the calculation logic of [Algorithms](/v14/docs/algorithms) in the Layout. > [!NOTE] > *If a Rule refers to members that are outside of an active Selection, the formulas will only be calculated if the Entity on which the Rule was defined is also in the Structure of the Cube (at physical level).* To **use a Rule in a Layout**, select the Cube on which the Rule should be applied and then pick a Rule from the Block settings sliding right panel, under the "Rules" submenu. ![contents/assets/images/rule in a layout.gif](https://cdn.document360.io/8d6f1ae8-0cac-4d0d-a208-6245b83df94a/Images/Documentation/use-of-rules-in-layouts-image-8onxl1gc.png) To **apply a Rule** where the Entity in which the Rule is defined is set **By Row**, the Layout must meet the following requirements: - The "By Row" field in the Axes area cannot be empty. - The Entity on which the Rule is defined must be set By Row and be in the most-nested (rightmost) position. - An Entity of the same hierarchy as the Entity on which the Rule is defined cannot also be set By Row. > [!NOTE] > *If the Entity is set By Row, it is possible to add another Entity By Row 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. You can apply a Rule to an Entity which contains an unbalanced hierarchy if the Entity is set By Row in the Layout.* To **apply a Rule** where the Entity in which the Rule is defined is set **By Column**, the Layout must meet the following requirements: - The "By Row" field in the Axes area cannot be empty. - The Entity on which the Rule is defined must be set By Column. - No other Entity can be set By Column. > [!NOTE] > *If the Entity is set By Column, it is not possible to add another Entity By Column. You can apply a Rule to an Entity which contains an unbalanced hierarchy if the Entity is set By Column in the Layout.* Rules can also be added from the blue plus icon in the Layout: ![contents/assets/images/rule from dp.gif](https://cdn.document360.io/8d6f1ae8-0cac-4d0d-a208-6245b83df94a/Images/Documentation/use-of-rules-in-layouts-image-m16hdbb6.png) Or, from the Data panel of the Layout editor, in the "More" subpage, by dragging and dropping them into the Data area: ![contents/assets/images/RuleofLayout.More.gif](https://cdn.document360.io/8d6f1ae8-0cac-4d0d-a208-6245b83df94a/Images/Documentation/use-of-rules-in-layouts-image-lehw1fgy.png) In this case, the selected Rule is displayed as a separate Column in your report and 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"). > [!TIP] > **Example** If a Rule is defined on the Entity "Area" 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 "Year", and add it as the first Entity in the "By Row" field as shown below. ![contents/assets/images/Rules.layout.axes.example.rule.PNG](https://cdn.document360.io/8d6f1ae8-0cac-4d0d-a208-6245b83df94a/Images/Documentation/use-of-rules-in-layouts-image-jbt2t277.png) > [!NOTE] > *Rules can be applied alongside* *Time Functions* *in a Layout: in that case, the selected Time Function is always executed before the Rule. Rules and Time Functions cannot be enabled on the same Block.* Time Functions are a set of built-in functions available when designing Layouts (or Data Blocks) in Board that operate on time dimensions (e.g. Year, Month, Week) to support common temporal-analysis patterns, like "Previous Year", "Year-to-Date", "Rolling Total", forecasting and so on. They apply to numerical Cubes that include a time dimension (Time Entity) and are used to produce alternate time series views (e.g. compare current period to previous period) rather than writing manual formulas for every scenario.