--- title: "Use a Rule in a Dataflow" slug: "use-a-rule-in-a-dataflow" description: "Configure a Board Dataflow to reference a Rule as a source or driver; map Entities, apply time offsets or functions, set clear or write options, and validate allocation outcomes." tags: ["Developer", "Rule", "Dataflow", "Time Functions", "Procedure"] updated: 2026-09-22T08:11:47Z published: 2026-09-22T08:11:47Z canonical: "help.board.com/use-a-rule-in-a-dataflow" --- > ## 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 a Rule in a Dataflow This topic describes **how to use Rules in a Dataflow Procedure step**. Rules can be used in a Dataflow Procedure step. By running a Rule for a Cube in a Dataflow, the calculation results of the formula are stored in the target Cube. The target Cube must contain the Rule Entity as a dimension which must be consolidated. Multiple Rules are supported in a single Dataflow Layout, but they must be applied to the same Entity on each Block. **To run a Rule for a Cube in a Dataflow Procedure step**: 1. Create a Procedure and define a Dataflow step. 2. Click on "CONFIGURE LAYOUT" to enter the Layout editor of the Dataflow and select the Cube on which the Rule should be applied. 3. Select a Rule from the Block settings under the "Rules" submenu. 4. Click "SAVE" to save the Rule configuration and then "SAVE" to save the Layout configuration. 5. From the Dataflow step configuration panel, select the target Cube and enter the calculation in the "Expression" field. 6. Configure all other properties as needed (optional). 7. Click on "ADD". ![rules.add.rule.dataflow](https://cdn.document360.io/8d6f1ae8-0cac-4d0d-a208-6245b83df94a/Images/Documentation/rules.add.rule.dataflow.gif) Rules generally include algorithms or formulas which cannot be aggregated (for example percentages and ratios), so Rules are usually not applied in Dataflow steps. 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. > [!NOTE] > **Rules applied via a Dataflow Procedure step Entity sorting logic** > > Rules that use ranges and are applied using a Dataflow Procedure step **ignore the Entity sorting logic** and uses the natural Entity order, which is the order in which members were added to the Entity. > > When a Rule is applied directly to a Data View or a Flex Grid, the Rule uses the sorting order defined for the Entity. When a new Entity member is added, this sorting order can place the new member inside an existing Rule range. > > When a Rule is used in a Dataflow for a Data View or a Flex Grid, the sorting order defined for the Entity is ignored. > [!NOTE] > To properly calculate all members of the Entity where a Rule has been set, the "Extend calculation" option must be enabled on that Entity. To apply a Rule to a Cube in the Dataflow Layout, select the appropriate Cube and apply the desired Rule from the "Rules" submenu in the Block settings. The Cube must have the Rule Entity in its Structure. You cannot add a Rule as a Block of the Dataflow Layout. If a Rule refers to a previous Block in the Layout through the [column offset operator](/v15/docs/creating-a-rule#the-column-offset) and that Block is also the target of the Dataflow, then the ["Period by Period recursion" option](/v15/docs/the-dataflow-action#period-by-period-recursion) can be enabled. 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.