# Branch Assignment

This article explains **Branch Assignment** for variables in Model Reef.

You will learn:

* How branch assignment works.
* How variables roll up through the branch tree.
* How branch choices affect consolidation and reporting.

Branches represent entities, divisions, stores, projects and other business units inside a model.

{% stepper %}
{% step %}

### What branch assignment does

Every variable belongs to one branch. Branch assignment determines:

* Which branch level P\&L, Balance Sheet and Cashflow the variable contributes to.
* How the variable's values roll up into parent branches.
* How branch filters in dashboards and reports include or exclude the variable.

The same variable cannot belong to multiple branches. To represent the same logic in different places you create separate variables, often driven by shared drivers.
{% endstep %}

{% step %}

### Where to assign branches

You assign branches in:

* The **Variable Editor** header, using the Branch Selector.
* The **import mapping** step, where imported lines are allocated to branches.
* Occasionally in the Data Library when central entries are remapped to different branches via their variables.

When you move a variable to a different branch, its behaviour does not change, only where its impact appears.
{% endstep %}

{% step %}

### Branch rollup logic

Branch assignment follows simple rules:

* A variable's values contribute to its own branch.
* That branch's results roll up into its parent branch.
* The process repeats up the tree to the model root.

Disabling a branch removes the contribution of that branch and its children from consolidated views, without deleting any variables.
{% endstep %}

{% step %}

### Using branches for structure

You can structure branches to represent:

* Legal entities.
* Business units or divisions.
* Individual stores, outlets or projects.
* Regions or countries.

Assigning variables accordingly allows for granular reporting at any level of the tree and fully consolidated group views.
{% endstep %}

{% step %}

### Permissions and branch assignment

Branch level permissions interact with branch assignment:

* Users can only see and edit variables in branches they have access to.
* Moving a variable between branches may change who can see or edit it.

Owners should be careful when reassigning variables in models with complex permission structures.
{% endstep %}

{% step %}

### Best practices

For clean branch assignment:

* Decide early on the branch hierarchy for the model.
* Assign variables consistently according to that design.
* Use shared drivers for cross branch logic rather than duplicating complex formulas.
* Document any unusual branch choices with notes.

This keeps both structural and financial outputs clear as models grow.
{% endstep %}
{% endstepper %}

## Related articles

* [Branch Selector](/syntax/understanding-the-interface/branch-selector.md)
* [Multi-Branch Driver Behaviour](/syntax/drivers-syntax/multi-branch-driver-behaviour.md)
* [Branch Hierarchy Rules](/help/building-your-model/branch-hierarchy-rules.md)
* [Build a Machine Readable Model for Automation](/how-tos/data-workflows-and-automation/build-a-machine-readable-model-for-automation.md)


---

# 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://help.modelreef.io/syntax/variables-syntax/branch-assignment.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.
