> 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/planning-sheets/how-tos/optimize-overview/optimize-input-values-to-meet-a-target.md).

# Optimize input values to meet a target

Use target-based optimization to determine the input values required to achieve a specific business objective, such as a revenue target. Optimize recalculates one or more selected input measures and updates them with the values needed to achieve the specified result.

### Prerequisites

Before you begin, review the [Prerequisites section for Optimize](/planning-sheets/how-tos/optimize-overview.md#prerequisites) to understand the initial setup requirements.

### Achieve a target on a calculated field <a href="#run-optimize-on-calculated-fields" id="run-optimize-on-calculated-fields"></a>

To demonstrate target-based optimization, set a target for the calculated field *Profit forecast* by optimizing independent variables - *Revenue Forecast*, *Purchase Forecast*, *Advertising Forecast*, and *Transport Forecast*.

{% hint style="info" %}
You can optimize values at any hierarchy level. In this example, optimize at the total level. When Optimize runs on a parent cell, it recalculates the required change and distributes the updated value to the underlying editable child cells.
{% endhint %}

1. Select the target cell in the calculated measure. In the **Planning** ribbon, select **Optimize**. In this example, select the target cell from the *Profit Forecast* measure.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FqzmZlaBUE0qEnPMtNKuz%2Fimage.png?alt=media&amp;token=a8e93a54-f609-4ab6-887f-5804f24dfd7d" alt=""><figcaption></figcaption></figure>

2. To achieve a specific target, set **Objective** to **Target** and enter the target value. In this example, set the target value to 45m.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FnrEIZpdgXBs7L2yJ6kBh%2Fimage.png?alt=media&amp;token=37d6f5dc-38bc-4d0f-aea7-1d8c2683450c" alt=""><figcaption></figcaption></figure>

3. Select the data input or forecast measures (independent variables) to optimize from **Variables to Update**. In this case, Optimize adjusts the *Revenue Forecast*, *Purchase Forecast*, *Advertising Forecast*, and *Transport Forecast* to achieve the target *Profit Forecast*. Select **Next**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FZeaEooi2TCHRds9vEycq%2Fimage.png?alt=media&amp;token=65b9cb8b-3869-4e14-9cc6-6d7202089d39" alt=""><figcaption></figcaption></figure>

4. Select **Add Constraint** to define the minimum and maximum limits for the data input measure. For more information, see [Configure optimization thresholds](https://docs.fabricplan.com/documentation/readme/planning-sheets/how-tos/optimize-overview#configure-optimization-thresholds).

{% hint style="info" %}
Adding constraints is optional. Directly select **Run** to skip defining constraints; however, as a best practice, explicitly specify constraints for all the independent measures used in Optimize.
{% endhint %}

5. Choose the measure to apply the constraint from **Apply to Variable**. Select **Range** for the **Set Type** option. Enter the minimum and maximum optimization thresholds.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FRGeRb6Q2UrbjPWWCb5qu%2Fimage.png?alt=media&amp;token=f922b6ca-1836-4d0b-9607-88cc3b587f94" alt=""><figcaption></figcaption></figure>

6. Select **Apply**. Select **Add** to specify additional constraints. Select **Run** after you define all the constraints.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2Fhs7JJMS2v4OD8qZTeaIV%2Fimage.png?alt=media&amp;token=49cdfa0b-6276-4f46-a6ff-a2940bf2aed0" alt=""><figcaption></figcaption></figure>

7. Review the adjusted values, then select **Apply** to update the independent measures with the optimized values. For more information about Optimize parameters, see [Adjust parameters to achieve targets](/planning-sheets/how-tos/optimize-overview.md#adjust-parameters-to-achieve-targets).

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F6I0L15aH36FEtKCoH2dQ%2Fimage.png?alt=media&amp;token=3860a9c7-5ec0-4597-b3c8-ef7b0dc3a334" alt=""><figcaption></figcaption></figure>

8. Optimize increases the *Profit Forecast* to 45m from 43.92m after adjusting independent measures within the specified constraints. Since you applied Optimize to a total value, the update is cascaded to all the related child dimensions.

{% hint style="info" %}
Optimize doesn't change the values of locked cells. The target value is achieved by adjusting the values of editable cells.
{% endhint %}

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FfrlY0rE6Js3e8I9MzJXL%2Fimage.png?alt=media&amp;token=c91877f1-e928-4588-89b6-6634427ffbbf" 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/planning-sheets/how-tos/optimize-overview/optimize-input-values-to-meet-a-target.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.
