# Create a model using Model Builder

In this article, you learn how to build a model for your data using the Model Builder.

Consider the brewery data sample shown below in the planning sheet.

<figure><img src="/files/bEED0rhqg3QrWVQE3N7W" alt=""><figcaption></figcaption></figure>

The first column contains a list of General Ledger (GL) account items for various quarters of the year 2026. In this module, you learn how to create a sample Profit and Loss (P\&L) model using this example.&#x20;

{% hint style="info" %}

#### Note

Data can include both actuals and forecasts, and models can be configured to handle both closed and open periods.

To learn more, refer to [Hybrid row configuration](/planning-sheets/how-tos/configure-row-properties-in-the-model.md#hybrid-row-configuration).
{% endhint %}

### Objectives and approach

* You learn how to group related line items into a hierarchical structure.
* You create formula or aggregate rows to calculate key financial metrics such as *Gross Revenue*, *Net Revenue*, *Total Cost of Goods Sold (COGS), Gross Profit*, *Operating Income (EBIT), Income Tax Expense*, and *Net Profit*.&#x20;
* Finally, you build a reusable and scalable P\&L model for your sample data, step by step.&#x20;

### Create model

1. Go to the Model Builder by selecting **Model > Driver Model** and then selecting **Enable** in the pop-up.

<figure><img src="/files/XQFIOoCpcpJw7J0g691N" alt=""><figcaption></figcaption></figure>

The Driver Model view opens, where you build the model.&#x20;

<figure><img src="/files/l4HTTpIw9JDarf5FiOCj" alt=""><figcaption></figcaption></figure>

2. Delete all rows except the topmost row (*All)* to start building your model from scratch. To delete rows, select the required rows and then select **Delete.**

<figure><img src="/files/UoQhfuTgz4C6yFcpZRYs" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### Tip

Select the **Select All** checkbox in the column header to select all nodes, then clear the selection for the top node.

<img src="/files/vsYKITbi19raj3CH3NLM" alt="" data-size="original">
{% endhint %}

The model will look like this, with one row:

<figure><img src="/files/OT9aJuIm9Nm9HkYNPgU5" alt=""><figcaption></figcaption></figure>

3. Start with the top-level parent row in your model. Since the objective is to calculate *Net Profit*, rename the top row to ***Net Profit*** by double-clicking the ***All*** row and updating its name.

<figure><img src="/files/UlWJjZP31INfGOUYrA8a" alt=""><figcaption></figcaption></figure>

#### Add Child row

The net profit or the net income for this model can be calculated using the formula:&#x20;

{% code overflow="wrap" %}

```
Net Profit = Income Before Tax(EBT) - Income Tax Expense
```

{% endcode %}

This means the *Net Profit* row needs two child rows: *Income Before Tax* and *Income Tax Expense*.

To add a child node, select the **+** icon next to the node. You can also select the node to which you want to add child rows, then select **Add Child** and [choose the type of row](https://docs.fabricplan.com/planning-sheets/how-tos/pages/xfiMOgyqnLoMBuvoTxlN#id-1.1.-node-name-1) you want to add.

<figure><img src="/files/fPpVXtF1luVdbvdxUvze" alt=""><figcaption></figcaption></figure>

Add another child row for *Net Profit* and rename both rows.

<figure><img src="/files/ddjMMJxAiqDky4dowPbb" alt=""><figcaption></figcaption></figure>

#### Row type configuration

* The *Net Profit* row is a formula row. In **Type**, select **Formula**. Alternatively, you can select **Aggregate**.&#x20;
* Select **Configuration**. Choose **Subtract** from the side panel that opens automatically. Select **Apply**.

<figure><img src="/files/RteG5rceYTcVTKOR3X6C" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### Note

Using **Aggregate** automatically aggregates the child rows, while **Formula** uses explicit row name references to perform the calculation.&#x20;

If row names change, make sure to update the formula accordingly.
{% endhint %}

* Similarly, configure the child rows' type as per your requirements. Select ***Data Source*** to retrieve values from the source data, or choose ***Data Input*** to enter values manually.
* For a **Data Source** row, select the corresponding row from the data source in the side panel to retrieve the values. If you choose the **Data Input** type instead, enter the values manually in the side panel.

<figure><img src="/files/W4QS4QHVnroJBn8E3QS4" alt=""><figcaption></figcaption></figure>

By following the above steps, you have created a calculated row at the top level.

Now, repeat the same process to add additional child nodes and continue configuring their row type and configuration settings.

#### Add Formula type row

For some rows, selecting the **Formula** type is more suitable than using the **Aggregate** type.&#x20;

{% code overflow="wrap" %}

```
Income Before Tax (EBT) = Operating Income (EBIT)
                          + Interest Income
                          - Interest Expense
                          + Other Non-Operating Income
```

{% endcode %}

For *Income Before Tax (EBT)*,&#x20;

* Create four child rows.&#x20;
* Configure the **Type** as *Data Source* for the child rows if you have data in the source.
* For each row, select the corresponding row from the data source.

<figure><img src="/files/CJbesBHUsK8IyDbhW6x8" alt=""><figcaption></figcaption></figure>

* For the parent ro&#x77;*, Income Before Tax (EBT)*, configure it as **Formula** type.&#x20;
* Enter the formula in the formula box by selecting and referencing the required rows. As you type, suggestions appear automatically, or use Ctrl + Space to view them. You can switch between the **References** and **Functions** tabs to select row references or functions.

<figure><img src="/files/qneHX11YqvBA928Li1Xz" alt=""><figcaption></figcaption></figure>

* Complete other configurations for the row and select **Apply**.

<figure><img src="/files/MRCiPFWGarcXCY9k9sTC" alt=""><figcaption></figcaption></figure>

#### Build further rows

Use the steps described above to create and configure additional row structures.

{% code overflow="wrap" %}

```
Income Before Tax (EBT)
	Operating Income (EBIT)
		Gross Profit
			Net Revenue
				Gross Revenue
					Volume
					Revenue per Barrel
				Federal & State Excise Taxes
				Distributor Allowances & Rebates
				Returns & Breakage
			Total COGS
		Total Operating Expenses
```

{% endcode %}

<figure><img src="/files/yhlb1eRhySdaMZ7jogBv" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

#### Tip

Alternatively, use the [**Bulk Insert**](#add-multiple-rows-using-bulk-insert) feature to instantly build the model.
{% endhint %}

#### Add Sibling row

To add a new row at the same level as an existing one, select the row, and then select **Add Sibling**. This creates a sibling row for the selected row.

<figure><img src="/files/eyIKCfeEQTPr9t7WRzXJ" alt=""><figcaption></figcaption></figure>

In the example above, two line items, *Distributor Allowances & Rebates* and *Returns & Breakage*, are to be added at the same level as *Federal & State Excise Taxes*.

You can add two of them as sibling rows to the first line item.

<figure><img src="/files/PLFsH9bKyn3pXwMHcGPx" alt=""><figcaption></figcaption></figure>

Repeat the same steps to build the *Total COGS* section and complete the model. You can also use the **Bulk Insert** and **Bulk Edit** features to speed up the process.

### Add multiple rows using Bulk Insert

Use **Bulk Insert** to add multiple rows at once or build the entire model in one step. This is useful when you already have the model structure planned or prepared.

1. Select the row under which you want to add new rows.
2. Select **Bulk Insert**.
3. Enter the row names, with each row on a new line.
4. Use the **Tab** key to create child rows and define the hierarchy.
5. Choose whether to insert the rows as **Child** or **Sibling** rows to the selected row.
6. Select **Add** to apply the changes.

<figure><img src="/files/xMXCOeJNGHcgsGZyle59" alt=""><figcaption></figcaption></figure>

The rows are added under *Total COGS* based on the defined structure. Update the type and configuration for each row as needed.

<figure><img src="/files/QtPR7eIAlRsf6eeIExap" alt=""><figcaption></figcaption></figure>

#### Aggregation

The **Aggregation** property is typically set to *Sum* to roll up column values across the period from January to December. For rows that represent rates or percentages, set it to *Average (Children)*.

<figure><img src="/files/C9AnbJotj6TGNzUZIPFJ" alt=""><figcaption></figcaption></figure>

### Edit multiple rows using Bulk Edit

If multiple rows share common settings, use **Bulk Edit** to format them all at once.&#x20;

1. Select the rows that you want to format.
2. Select **Bulk Edit**.
3. In the side panel, enter the required settings, such as scale, decimal points, prefix, suffix, desired trend, simulation settings, and description.
4. Select **Apply** to apply these settings to all selected rows at once.

<figure><img src="/files/B1eouWtB0RaxPSNMjIq8" alt=""><figcaption></figcaption></figure>

### Finish model

The completed model looks like this:

<figure><img src="/files/4NwNxxC8jxbwignY6bYR" alt=""><figcaption></figcaption></figure>

The model you build applies to the **Open Period** by default, unless you modify specific rows by toggling to the **Open Period**.

<figure><img src="/files/3jpfVLgdMBUDNz3S2K8W" alt=""><figcaption></figcaption></figure>

### Build model in one step

If you have the complete model structure handy in a notepad, you can build the entire model in one step by copy-pasting it through [**Bulk Insert**](#add-multiple-rows-using-bulk-insert).&#x20;

You can then configure the type, configuration, formatting, and aggregation individually or through [**Bulk Edit**](#edit-multiple-rows-using-bulk-edit).

{% code overflow="wrap" %}

```
Income Before Tax (EBT)
	Operating Income (EBIT)
		Gross Profit
			Net Revenue
				Gross Revenue
					Volume
					Revenue per Barrel
				Federal & State Excise Taxes
				Distributor Allowances & Rebates
				Returns & Breakage
			Total COGS
				Brewing Materials
				Packaging
				Water & Utilities
				Brewing & Production Labor (Input)
				Plant Overhead & Maintenance (Input)
				Inbound Freight & Warehousing (Input)
				Brewery Depreciation (Input) 
		Total Operating Expenses
			Selling & Marketing (Input)
			Outbound Distribution & Logistics (Input)
			General & Administrative (Input)
			Research & Product Development (Input)
			Non-Production D&A (Input)
			Other Operating Expenses (Input)
	Interest Income
	Interest Expense
	Other Non-Operating Income
Income Tax Expense
	Effective Tax Rate
```

{% endcode %}

You can reuse the model across different datasets that follow the same business logic. Maintain and scale the model by adding or removing rows and/or adjusting row configurations as needed to reflect changing business needs.&#x20;

This approach reduces the need to recreate formulas from scratch and ensures consistency across datasets that follow the same logic. Features such as **Bulk Insert** and **Templates** help streamline this process and enable efficient model building at scale.

### Next step

* [Create templates for reusable row structures](/planning-sheets/how-tos/create-templates-for-reusable-row-structures.md)
* Visualize the model using the tree layout

### Related content

* [Configure row properties in the model](/planning-sheets/how-tos/configure-row-properties-in-the-model.md)
* Create a driver-based model


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fabricplan.com/planning-sheets/how-tos/create-a-model-using-model-builder.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
