Create templates for reusable row structures
In this article, you learn how to create templates and use them in your model.
A template is a predefined layout of rows that can be used to build models with repetitive structures. You create the template once based on your requirements and reuse it multiple times across the model.
For example, a template such as Net Profit can be created once and then applied across different product categories to maintain a consistent structure.

Create a template
Consider the following model, which consists of repeated line items as rows for different companies.

To build a model structure that categorizes revenue and costs separately, you can create a template. A template is essentially a subset or a mini model that can be reused across your model for different categories wherever needed.
Select the row where you want to insert the template, then select Insert Template.

Build the template as you would build a model. First, rename the template by double-clicking and updating the name.
To add child rows, click the + icon (Add Child) or select Insert Row. Alternatively, you can use Bulk Insert to create the template structure at once.

The template structure is created as shown:

Configure the template's rows.

Ways to insert template
Templates can be inserted into the model in two ways:
Append: Append inserts the template row structure within the model as it is.

Replace: Replace replaces the existing model structure with the template's row structure.

Set Conditions
Insert the template at only specific levels in the model based on filter or set criteria. Assuming you have added two row dimensions, Company and Department, you can now set conditions based on them.
Simple: Choose the specific categories or levels to apply the template. Use Search to find any level. This is ideal for straightforward selection scenarios where no complex logic or grouping is required.

Advanced: Define complex rules for applying templates by combining multiple filters and groups.

In this mode, you can:
Add multiple filters (for example, Department is Admin or Company contains B)
Group filters using logical operators such as AND and OR
Create nested groups to build multi-level conditions
Each group can have its own AND/OR logic, allowing you to control how conditions are evaluated. For example:
The top-level group may use OR to apply the template if any condition is met
A nested group can use AND to ensure all conditions within that group are satisfied
Apply a template when Department is Admin OR Company contains B
Additionally apply it for a specific group where Department is Marketing AND Company is not C
Apply template to the model
If you choose Replace, the template is applied to the model as shown below. The template cannot be edited directly from the model; instead, edit the template to modify the row structure.

You can create multiple templates for a model and apply them wherever required.
Manage templates
Select Manage Template to edit, duplicate, or delete inserted templates.
Select the template that you want to modify from the list of available templates in the dropdown. Then choose the appropriate action icon to perform the required operation.
Select Add icon to create a new blank template.
Select Duplicate icon to create a copy of the selected template.
Select Delete icon to delete the template.

Last updated
Was this helpful?