> ## Documentation Index
> Fetch the complete documentation index at: https://runway-docs.cfo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Segmenting drivers

> Segment drivers with dimensions so one metric can be modeled by department, region, account, or another business attribute.

Segmenting drivers lets one driver represent many dimension values. Use it when a single metric, such as Revenue or Headcount, should be modeled by Department, Region, Account, Product, or another dimension.

## Why segment drivers?

### Easier and scalable modeling

Without dimensions, modeling **Growth Rate by Region** might require separate drivers such as `Growth Rate - US` and `Growth Rate - EMEA`. That naming pattern gets hard to maintain, and totals must reference each driver manually.

<Frame>
  <img src="https://mintcdn.com/runway-5055a12e/0-jNkfTOE8i72Ekr/images/guides/segmenting-unsegmented-growth-rate-drivers.png?fit=max&auto=format&n=0-jNkfTOE8i72Ekr&q=85&s=5dd99712690e080ce1a2fca90bb61f84" alt="Separate unsegmented growth rate drivers by region" width="1888" height="474" data-path="images/guides/segmenting-unsegmented-growth-rate-drivers.png" />
</Frame>

With dimensions, a single **Growth Rate** driver can be segmented by **Region**. You can write one formula that applies to each region using [This Segment](/concepts/databases/formulas-in-databases#dynamic-formulas-using-this-segment), and rollups stay maintained as dimension values are added.

<Frame>
  <img src="https://mintcdn.com/runway-5055a12e/0-jNkfTOE8i72Ekr/images/guides/segmenting-growth-rate-by-region.png?fit=max&auto=format&n=0-jNkfTOE8i72Ekr&q=85&s=4576271f102fd3e158b658e657a079c8" alt="Single growth rate driver segmented by region" width="2210" height="502" data-path="images/guides/segmenting-growth-rate-by-region.png" />
</Frame>

### Roll up and drill into data

Dimensions make it easier to model at different levels of granularity.

For example, a database with **Revenue** segmented by **Region** and **City** has one driver per region-city combination.

<Frame>
  <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/segment-why-2.png?fit=max&auto=format&n=_tyDrsjKuAGqMAvO&q=85&s=67f51c6b318df308fea03e655237ba6a" alt="Revenue segmented by region and city" width="998" height="496" data-path="images/dimensions/segment-why-2.png" />
</Frame>

To view Revenue rolled up by Region, create a rolled-up database:

<Steps>
  <Step title="Open or create the rollup database">
    Open the target database where the rolled-up data should live, or [create a database](/concepts/databases/databases-basics#creating-a-database).
  </Step>

  <Step title="Open configuration">
    Click **Edit** to open [database configuration](/concepts/databases/databases-basics#configuring-a-database).
  </Step>

  <Step title="Add the source">
    Add the source database that is segmented by Region and City.
  </Step>

  <Step title="Choose drivers">
    Choose the drivers you want to aggregate, such as Revenue.
  </Step>

  <Step title="Choose the rollup segment">
    Under **Segment by**, select the higher-level dimension, such as Region.
  </Step>

  <Step title="Confirm">
    Click **Confirm**.

    <Frame>
      <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/segment-why-3.gif?s=155cc93b1af9ad16caabea2955fff73d" alt="Creating a rollup database from a more granular segmented database" width="800" height="421" data-path="images/dimensions/segment-why-3.gif" />
    </Frame>
  </Step>
</Steps>

The Revenue driver is now available at both granularities: Region x City and Region.

<Frame>
  <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/segment-why-4.gif?s=097e031d0af4daba52e4d3ad65f961a0" alt="Driver search showing revenue at multiple granularities" width="800" height="395" data-path="images/dimensions/segment-why-4.gif" />
</Frame>

You can [drill in](/concepts/drivers/drill-ins) when you want detail and roll up when you want the big picture.

<Frame>
  <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/segment-why-5.png?fit=max&auto=format&n=_tyDrsjKuAGqMAvO&q=85&s=2d4ac0d664ef9d65388766ac50986821" alt="Rolled up revenue with drill-in detail" width="1738" height="994" data-path="images/dimensions/segment-why-5.png" />
</Frame>

You can create similar hierarchies from other columns, not only the dimensions used in database configuration.

## How to segment drivers

### Segmenting drivers in a database

When [configuring a database](/concepts/databases/databases-basics#configuring-a-database), the **Segment by** field determines how the drivers in that database are broken down.

<Frame>
  <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/segment-how-1.png?fit=max&auto=format&n=_tyDrsjKuAGqMAvO&q=85&s=a062a047bfb153cb3cf17d0cecbfaa39" alt="Database configuration Segment by field" width="2510" height="1680" data-path="images/dimensions/segment-how-1.png" />
</Frame>

For example, a granular GL database might segment by `Account Name`, `Class`, and `Vendor`. A later rollup database might source from that granular database but segment only by `Class`.

### Segmenting drivers in a model

You can segment an unsegmented driver in a [model](/concepts/models/models-basics):

<Steps>
  <Step title="Open the driver menu">
    Click the menu next to the driver name.
  </Step>

  <Step title="Add dimension">
    Hover over **Dimensions**, then select **Add dimension**.

    <Frame>
      <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/add-dimension-to-driver.png?fit=max&auto=format&n=_tyDrsjKuAGqMAvO&q=85&s=6b673b1cb878d4ec971a1d93c737a7ba" alt="Driver menu with Add dimension action" width="1076" height="786" data-path="images/dimensions/add-dimension-to-driver.png" />
    </Frame>
  </Step>

  <Step title="Choose or create the dimension">
    Choose an existing dimension, or type a new name and press Enter to create one.

    <Frame>
      <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/create-dimension-through-driver.png?fit=max&auto=format&n=_tyDrsjKuAGqMAvO&q=85&s=169bc7bb3334675b074a022d0ef4b0ea" alt="Creating a dimension from a driver menu" width="752" height="384" data-path="images/dimensions/create-dimension-through-driver.png" />
    </Frame>
  </Step>

  <Step title="Define values">
    Define the dimension values from the submenu.

    <Frame>
      <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/segment-how-2.png?fit=max&auto=format&n=_tyDrsjKuAGqMAvO&q=85&s=0bbb813d0673f5353572268cfd134e27" alt="Segmented driver values created from a dimension" width="1010" height="430" data-path="images/dimensions/segment-how-2.png" />
    </Frame>
  </Step>
</Steps>

### Segmenting drivers in a model using Expand by dimension

Use **Expand by dimension** when you need one driver per dimension value from a model. This pattern is most common in legacy headcount models.

<Warning>
  When you use **Expand by dimension** directly in a model, new dimension values do not automatically create new drivers. Run the expand flow again when new values are added.
</Warning>

<Steps>
  <Step title="Select the driver">
    In a model, select the driver you want to expand.
  </Step>

  <Step title="Choose Expand by dimension">
    Open the driver menu, hover over **Dimensions**, then select **Expand by dimension**.
  </Step>

  <Step title="Choose the dimension">
    Select the dimension to use as the segment. Runway creates one driver segmented by each value in that dimension.

    <Frame>
      <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/expand-by.gif?s=4baf50f4048dd7e1a52e5bd5a1cf776d" alt="Expand by dimension creating segmented drivers" width="800" height="458" data-path="images/dimensions/expand-by.gif" />
    </Frame>
  </Step>

  <Step title="Set a formula first when possible">
    Expand by dimension works best when the source driver already has a formula filtered by the dimension you plan to use.

    <Frame>
      <img src="https://mintcdn.com/runway-5055a12e/_tyDrsjKuAGqMAvO/images/dimensions/expand-by-formula.png?fit=max&auto=format&n=_tyDrsjKuAGqMAvO&q=85&s=88ae39dabf871fc3882eaed28f5c4fc6" alt="Formula using a dimension filter before Expand by dimension" width="1104" height="268" data-path="images/dimensions/expand-by-formula.png" />
    </Frame>
  </Step>

  <Step title="Review smart-matched formulas">
    When the formula uses the same dimension as a filter, Runway smart-matches the formula to each dimension value.

    <video muted autoplay="true" loop controls playsinline="true" class="doc-video" src="https://mintcdn.com/runway-5055a12e/-OYzWIFfV5GF-vsA/videos/expand-by-smart-formula.mp4?fit=max&auto=format&n=-OYzWIFfV5GF-vsA&q=85&s=5e946cdf476cb15ab7c912057c954f3b" data-path="videos/expand-by-smart-formula.mp4" />
  </Step>
</Steps>

## What's next

* [Dimensions basics](/concepts/dimensions/dimensions-basics)
* [Databases basics](/concepts/databases/databases-basics)
* [Headcount planning](/guides/modeling/headcount-planning)
