# Build Cross Branch Drivers & Dependencies

This guide explains how to build cross branch drivers and dependencies in Model Reef. Branches represent divisions, geographies, projects or entities, but many assumptions and relationships span multiple branches, for example central overhead allocations or group level drivers.

Model Reef does not use cell based references between branches. Instead, you use shared drivers, Data Library entries and formulas that reference variables across the model where appropriate.

## Before you start

You should have:

* A multi branch model where branches represent meaningful business units.
* A clear idea of which relationships cross branch boundaries, for example:
  * Group level drivers that apply to all branches.
  * Allocations of central costs to branches.
  * Dependence of one branch on outputs from another (for example internal transfers).

If you are new to branches, see:

* **Model Structure Principles**
* **Branches, Toggles and Consolidation**

## What you will build

By the end of this guide you will have:

* Shared drivers in the Data Library that can be used by variables in multiple branches.
* Formulas that reference variables or categories across branches in a controlled way.
* A structure that makes cross branch dependencies explicit and auditable.

{% stepper %}
{% step %}

### Identify cross branch relationships

List the dependencies you want to represent, for example:

* Central marketing drivers that affect all branches.
* A head office cost centre allocated to branches based on revenue.
* A central financing branch providing intercompany loans.
* Internal transfers of goods or services between branches.

Different relationships may require different modelling patterns, but they all benefit from shared drivers and clear formulas.
{% endstep %}

{% step %}

### Create shared drivers in the Data Library

For any driver that is logically the same across branches, create a single Data Library entry, for example:

* `Assumption - Inflation - General`
* `Driver - Group Marketing Ratio to Revenue`
* `Driver - Allocation Key - Revenue Share`

These drivers are model wide and can be referenced in variables in any branch.

If allocation keys differ by branch, you can either:

* Use a single driver with branch specific formulas in variables, or
* Create separate drivers per branch with consistent naming such as `Driver - Allocation - Branch A`.
  {% endstep %}

{% step %}

### Use shared drivers in branch variables

Within each branch:

* Create variables that reference the shared drivers, for example:
  * `Opex - Marketing - Local` using branch specific revenue and a shared marketing ratio driver.
* Ensure formulas are consistent across branches where the policy is the same.

This pattern gives you branched outputs that are still controlled via centralised drivers.
{% endstep %}

{% step %}

### Build cross branch allocation variables where needed

For central costs that need to be allocated to branches:

* Place the central cost variable in a head office or group branch.
* Create allocation variables in each recipient branch, for example:
  * `Allocated HQ Cost - Branch A`
  * `Allocated HQ Cost - Branch B`
* Use formulas based on allocation keys, for example:
  * Allocation equals total central cost multiplied by branch's share of group revenue.

Be explicit about whether the central cost remains visible at head office level in addition to branch allocations, or whether allocations fully distribute the cost.
{% endstep %}

{% step %}

### Use cross branch references carefully

When referencing variables across branches in formulas:

* Make sure you are referencing well defined, stable series, such as:
  * Total revenue in a branch.
  * Total headcount.
* Avoid complex multi level chains of cross branch references that make the model hard to trace.
* Document cross branch references clearly using notes and naming conventions.

The goal is to represent genuine dependencies without creating opaque or fragile linkages.
{% endstep %}

{% step %}

### Test consolidation and branch views

After implementing cross branch drivers and dependencies:

* Review branch level P\&L, Cashflow and Cash Waterfall to confirm that dependencies behave as intended.
* Review the consolidated branch to ensure that allocations and cross branch flows are not double counted or omitted.

Make sure you can explain how any given cross branch effect shows up in both individual and consolidated views.
{% endstep %}
{% endstepper %}

## Check your work

* Shared drivers live in the Data Library and are referenced consistently across branches.
* Cross branch formulas are simple and clearly documented.
* Allocations do not break the interpretation of branch level performance.
* The consolidated view remains accurate and balanced.

## Troubleshooting

<details>

<summary>Allocations appear to double count costs</summary>

Check whether the original central cost is still included in the consolidated branch in addition to branch allocations, and decide whether it should be.

</details>

<details>

<summary>Difficult to trace cross branch effects</summary>

Limit the number of cross branch references and use clear naming like `Allocated HQ Cost` to signal derived items.

</details>

<details>

<summary>Branch owners want independence</summary>

Balance the need for local autonomy with centralisation by keeping shared drivers in the Data Library and allowing local overrides where justified and documented.

</details>

## Related guides

* [Mining, Energy & Natural Resources](/use-cases/mining-energy-and-natural-resources.md)
* [Drivers, Variables & Timing](/help/drivers-variables-and-timing.md)
* [Economic Drivers](/help/drivers-variables-and-timing/economic-drivers.md)
* [How to Enter Drivers](/syntax/how-input-fields-work/how-to-enter-drivers.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/how-tos/data-workflows-and-automation/build-cross-branch-drivers-and-dependencies.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.
