> For the complete documentation index, see [llms.txt](https://docs.fabricplan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fabricplan.com/user-guide/8-optimization-in-planning/8.1-target-based-optimization.md).

# 8.1 - Target-based optimization

The Optimize feature enables target and direction-driven planning by automatically adjusting input values used in calculations. Instead of manually testing different combinations, optimization simulates input values to achieve a specified target outcome—such as revenue, profit, or cost. By defining the target and selecting the input drivers, Optimize computes the optimal values that satisfy the formula constraints. This approach accelerates budgeting and forecasting, improves accuracy, and supports data-driven decision-making across planning scenarios.

In this tutorial, you learn to use target based optimization, define constraints, and apply optimized values to your planning sheet.

### Prerequisites

1. A planning sheet is created with measures, row, and column dimensions assigned.

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

   In this example, *PY Profit* is the difference between *PY Revenue*, *PY Purchase*, and *PY Transportation*. These measures are reported prior year actuals from the semantic model.

   <figure><img src="/files/SvoFCM9h4D5tZGmCAQrW" alt=""><figcaption></figcaption></figure>
2. Create data input measures (Independent variables). Native measures from the semantic model can't be edited. Before running optimization, create copies of the native measures that require optimization.

   In the **Planning** ribbon, go to **Insert Column > Number**. Select **Copy from another series**. Select the native measure to copy, in this case, *PY Revenue*.

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

   Enter the *Revenue Plan* as the measure name. Set **Insert as** to **Visual Measure**. Ensure **Input type** is **Number**, row and column aggregation types are **Sum**, and **Distribute parent value to children** is selected.

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

   Select **Create**. In this example, the same steps are repeated to create *Purchase Plan* from *PY Purchase*, and *Transportation Plan* from *PY Transportation*.
3. Create a formula measure (Dependent variable). The formula measure is the dependent variable. The independent variables are optimized to achieve the target value assigned to the dependent variable.

   In the **Planning** ribbon, go to **Insert Column > Formula**.

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

   Enter the *Profit Plan* as the measure name and enter the formula. Set **Insert as** to **Visual Measure**. Ensure the **input type** is **Number**. Row and column aggregation types must be set to **Formula**.

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

   Select **Create**.
4. Manage Column Display

   To view all the measures in the planning sheet, in the **Planning** ribbon, go to **Show Columns** and select the settings icon.

   <figure><img src="/files/43YaDNhsR9jjLVvrNMeP" alt=""><figcaption></figcaption></figure>

   To focus on the measures required for optimize, deselect the native measures from the semantic model. In this example, the visual measures are *Profit Plan*, *Revenue Plan*, *Purchase Plan*, and *Transportation Plan*. Only the selected measures are displayed in the planning sheet.

   <figure><img src="/files/JRLBB8yMdn1faTi4W66n" alt=""><figcaption></figcaption></figure>
5. Configure Aggregation Settings. Select the aggregation icon(Σ). Set **Row Grand Total** and **Row Subtotal** to **Top**.

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

### Configure optimizer (Target-based)

In this example, the total profit plan is 50.61 million. The steps outline how to achieve a target of 55 million in the profit plan.

1. Select the cell that shows the total *Profit Plan*.
2. Select **Optimize**.

   <figure><img src="/files/Ow8EL2INbnY2AyuVzDO1" alt=""><figcaption></figcaption></figure>
3. Set **Objective** to **Target**.

   <figure><img src="/files/7umWRk0MRFaQMr68DP71" alt=""><figcaption></figcaption></figure>
4. Set the **Target Value** to 55,000,000 (or 55m).
5. Select the independent variables, that is, the data input measures (*Revenue Plan*, *Purchase Plan*, and *Transportation Plan*) in the **Variables to Update** section.

   <figure><img src="/files/2qLl9om4XnUSp2kG4bSA" alt=""><figcaption></figcaption></figure>

#### Add constraints

In real-world scenarios, the independent variables often have constraints. This step isn't required when data input measures can be optimized without restrictions.

1. Select **+Add Constraints** to configure constraints.

   <figure><img src="/files/X5LJ7zH81pap5gZGt0Ca" alt=""><figcaption></figcaption></figure>
2. Set up thresholds for each data input measure. Select **Revenue Plan** as **Apply to Variable**. Select **Range** for **Set Type**. Configure the minimum and maximum values and select **Apply**.

   <figure><img src="/files/YjqswDOV2r0GoMzZmkl4" alt=""><figcaption></figcaption></figure>
3. Select **+Add** to configure constraints for the other independent variables and repeat the same steps.

   <figure><img src="/files/fyfpu9X2NSArDnJGOUFd" alt=""><figcaption></figcaption></figure>
4. Select **Run** to execute the optimizer.

#### Run optimizer and apply values

The optimizer auto-simulates the values of the independent variables within the specified thresholds to find the optimum value closest to the target value.

To achieve the target value of 55m in Profit Plan (the dependent variable), the optimizer auto-simulated values for *Revenue Plan*, *Purchase Plan*, and *Transportation Plan* (the independent variables).

Review the simulated values and select **Apply** to replace the values of the data input measures with the optimized autosimulated values.

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

The simulated values replace the original data input values in the planning sheet.

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fabricplan.com/user-guide/8-optimization-in-planning/8.1-target-based-optimization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
