# Setting up a weighted pipeline

URL: https://attio.com/help/reference/how-to-guides/setting-up-a-weighted-pipeline
Breadcrumbs: [Help](https://attio.com/help) > [Reference](https://attio.com/help/reference) > [How-to guides](https://attio.com/help/reference/how-to-guides)

Learn how to calculate a weighted pipeline value in Attio using a formula attribute.

> Available on pro, enterprise plans.
>
> **Admins** can create and manage attributes and workflows. **Members** can create and manage attributes with **Full access** to the relevant object or list.

A weighted pipeline adjusts each deal's value by its likelihood of closing, giving you a more accurate forecast than raw pipeline totals. For example, a $50,000 deal with a 40% close probability contributes $20,000 to your weighted pipeline. This guide walks through the full setup: a formula attribute that calculates each deal's weighted value from its deal stage, and the reports that turn weighted values into a forecast.

## How a weighted pipeline works in Attio

The weighted value is calculated by a single formula attribute. The formula reads each deal's stage, matches it to a close probability you define, and multiplies the Deal value by that probability.

Once this formula is created, weighted values appear for every deal that have a Deal value, including deals already in your pipeline. When a deal is created or moves to a new stage, its weighted value recalculates automatically.

Before you start, make sure the [Deals object is activated](https://attio.com/help/reference/managing-your-data/objects/manage-standard-objects#enable-a-standard-object) and your deals have values in the Deal value attribute.

## Create the weighted value formula attribute

First, decide what close probability each stage represents, as a whole number. For example:

| Deal stage    | Probability |
| ------------- | ----------- |
| Contacted     | 10          |
| Qualification | 20          |
| Evaluation    | 40          |
| Negotiation   | 75          |
| Closed Won    | 100         |

You don't need to include your lost stages. Any stage left out of the formula gets a probability of zero, so lost deals drop out of your weighted pipeline automatically.

> You must be an admin in your workspace, or have full access to the deals object, to create an attribute.

Then [create the attribute](https://attio.com/help/reference/managing-your-data/attributes/create-manage-attributes).

- Go to the Deals view.
- Click the three-dot menu ⋮ and select **Manage attributes**.
- Click **Create attribute**.
- Select **Formula** as the attribute type.
- Name the attribute Weighted value.

![](https://a.storyblok.com/f/234930/1214x665/ad3bce439a/create_attribute_weighted_value.png)

From here, click **+ Create formula** to open the formula editor. You can generate the formula with the AI composer or write it yourself.

### Generate the formula with AI

Paste the prompt below into the AI composer, and edit it to list your own stages and probabilities before you run it:

copy and edit this prompt

```
Write a formula that multiplies Deal value by a close probability based on
the deal's current stage, then divides by 100. Use these stages and
probabilities:
- Contacted: 10
- Qualification: 20
- Evaluation: 40
- Negotiation: 75
- Closed Won: 100
Any stage not listed should return 0.
```

![](https://a.storyblok.com/f/234930/800x599/304eec4177/paste_prompt_for_formula.gif)

Review the generated formula before moving on. Check that every stage that you set a probability for is included, and that each probability value is correct.

### How the formula works

Each `if()` condition checks whether the deal is in a given stage and returns that stage's probability if it is, or zero if it isn't. A deal can only be in one stage at a time, so the conditions add up to a single probability. The formula multiplies the deal value by that probability and divides by 100 to express it as a percentage.

### Set the output and save

Once the formula is in place:

- Check that the **Output** dropdown is set to **Currency**. If not, select it to override the output type.
- Select your currency from the **Currency** dropdown, matching the currency of your Deal value attribute, such as USD, EUR, or GBP.
- Optionally, adjust the **Display**, **Decimal Places**, and **Grouping** settings.
- Click **Save changes**.

![](https://a.storyblok.com/f/234930/800x650/b737441025/currency_settings_formula.gif)

Every deal with a deal value now shows a weighted value, and it updates automatically whenever the deal changes stage. To learn more about how the formula editor works, see [Formula attributes](https://attio.com/help/reference/managing-your-data/attributes/formula-attributes).

## Report on your weighted pipeline

Once each deal has a weighted value, you can build shared reports on a dashboard or pull ad hoc answers with Ask Attio.

### Create a weighted pipeline report

An [Insight report](https://attio.com/help/reference/managing-your-data/dashboard-and-reports/set-up-an-insight-report) shows your current weighted pipeline, broken down however your team forecasts.

1. Click **Reports** in the sidebar, then create or open a dashboard.
2. Click **+ Add report** and choose **Insight**.
3. Set **Data source** to Deals.
4. Set **Metric** to Weighted value with the **Sum** aggregation.
5. Set **Grouped by** to Deal stage.
6. Add a filter to exclude your won and lost stages, so the report shows open pipeline only.
7. Choose **Bar** as the visualization.

The report now shows your total weighted pipeline by stage. To see weighted pipeline per rep instead, set **Grouped by** to Deal owner.

### Ask questions with Ask Attio

For ad hoc questions, Ask Attio can query your attributes directly, including formula attributes, and answer in natural language. Try prompts like:

- "What's my total weighted pipeline across all open deals?"
- "Break down my weighted pipeline by deal owner."
- "Which five deals contribute the most to my weighted pipeline?"
- "Compare weighted pipeline for deals closing this quarter against last quarter."

Ask Attio answers are useful for quick checks, but they aren't saved or shareable. For numbers that your team checks regularly, build a report on a dashboard instead.

## FAQ

### Do I need to update my existing deals?

No. The formula calculates from each deal's current stage, so every deal with a deal value shows a weighted value as soon as you save the formula.

### What happens to deals in a stage that isn't in the formula?

They get a weighted value of zero. This is useful for lost stages, but it also means new pipeline stages won't count toward your weighted pipeline until you add them to the formula.

### How do I add a new deal stage to the formula?

Follow the steps in the [Create the weighted value formula attribute](https://attio.com/help/reference/how-to-guides/setting-up-a-weighted-pipeline#create-the-weighted-value-formula-attribute) to edit the attribute. Then, use the AI composer with the following prompt:

Add a new deal stage. It's called [DEAL STAGE] and I want the probability to be [PROBABILITY].

### How do I change the probability for a stage?

Open the Weighted value attribute, edit the probability in the relevant `if()` condition, and save. All deals recalculate automatically.

### What if I add or rename a pipeline stage?

Renaming an existing deal stage doesn't affect the formula, so deals in that stage will still show a weighted value.

However, if you add a new deal stage, update the formula to match. Deals in the newly-created stage will not show a weighted value until that stage is added to the formula with a probability value.

### Why isn't my deal showing a weighted value?

Check that the deal has a value in the Deal value attribute. The formula multiplies the deal value, so deals without one won't show a weighted value.

Also, check which stage the deal is in, and make sure that stage is in the formula.
