> 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-tutorials/3-optimize-input-values.md).

# 2 - Optimize input values

The Optimizer feature is an automated, goal-seeking tool designed to eliminate manual trial-and-error when adjusting budget and planning numbers.

When you set a target for a calculated result (such as Gross Profit or Net Margin), the Optimizer automatically back-calculates and adjusts your editable data input measures (like Sales Growth % or COGS reduction) to reach that exact financial goal.

In this tutorial, you build a Gross Profit sheet, create a formula measure, and run the Optimizer to find the combination of revenue growth and cost reduction that achieves a $12.5M gross profit target.

### Set up the Gross Profit sheet

In this section, you create a Gross Profit sheet that pulls in the sales plan and COGS from the semantic model. This sheet is the starting point for running the Optimizer.

1. In the Home ribbon, select New Planning Sheet. Enter Gross Profit and select Create.
2. Configure the field assignments:

| Field   | Value                                                                                                       |
| ------- | ----------------------------------------------------------------------------------------------------------- |
| Rows    | Region Name → Category → Sub-category                                                                       |
| Columns | Date hierarchy                                                                                              |
| Values  | 2026 Sales Plan from **From Sheets** > Plan Intro; COGS 2025 from the measures table in the semantic model. |

{% hint style="info" %}
Connect planning sheets by using columns from other planning sheets within the same plan item. This lets one planning sheet use data from another, making it possible to link related planning activities.
{% endhint %}

3. Double-click the **Sum of 2026 Sales Plan** label in the **Values** field and rename it to 2026 Sales Plan.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FVXZEi38NlYwBWbL7pM0I%2F1-map-sales-plan-dimensions-data-wells.png?alt=media&amp;token=009d60e1-182c-49ab-a406-dddb278edfea" alt=""><figcaption></figcaption></figure>

### Create editable input columns

In this section, you create editable copies of the Sales Plan and COGS columns. The Optimizer requires editable input columns, since the original semantic model measures can't be used as variables.

1. In the **Planning** ribbon, select **Number** > **Copy from another series** > **2026 Sales Plan**. Enter *Sales Plan* as the title and select **Create**.
2. In the **Planning** ribbon, select **Number** > **Copy from another series** > **2025 COGS**. Enter *COGS* as the title and select **Create**.
3. In the **Planning** ribbon, select **Show Columns** and hide the original *2026 Sales Plan* and *2025 COGS* columns. The editable Sales Plan and COGS input columns remain visible.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F8SC7tt9aP9i0mnQh5Oth%2Fimage.png?alt=media&amp;token=0045c56a-d754-410e-bc95-1433dac06d7d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The Optimizer requires editable data input columns. The original measures from other planning sheets and the semantic model measures can't be edited. The source measures remain unchanged and can be used as a baseline for comparison after the Optimizer runs.
{% endhint %}

### Calculate gross profit

In this section, you add a formula column that calculates Gross Profit from the Sales Plan and COGS input columns. This calculated value becomes the base on which the optimizer is applied.

1. In the **Planning** ribbon, select **Formula** and configure it as follows, then select **Create**:

| Setting            | Value                   |
| ------------------ | ----------------------- |
| Title              | Gross Profit            |
| Formula            | \[Sales Plan] - \[COGS] |
| Column aggregation | Formula                 |
| Row aggregation    | Formula                 |

2. *Gross Profit* appears in the grid, calculated from the two input columns. Collapse the row hierarchy to the category level. In the **Planning** ribbon, select **Totals** and enable **Column Grand Total** on the left.

### Run and apply the Optimizer

In this section, you run the Optimizer to find the combination of *Sales Plan* and *COGS* values that achieves the $12.5M Gross Profit target. You then apply the optimized values to the sheet.

1. Select the *Gross Profit* grand total cell. In the **Planning** ribbon, Select **Optimize**.
2. In Optimizer—Objectives and Variables, configure as follows and select **Next**:

| Setting             | Value            |
| ------------------- | ---------------- |
| Objective           | Target           |
| Target value        | 12.5m            |
| Variables to update | Sales Plan, COGS |

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FkM44aVwqCqz8agEQIx74%2F3-optimizer-set-objective-select-variables.png?alt=media&amp;token=293f51c3-35f9-49ef-8977-eb1773943454" alt="" width="563"><figcaption></figcaption></figure>

3. On the **Add Constraints** page, select **Run** without adding constraints.
4. On the **Output** screen, confirm **Target Value** shows 12.5M and **Achieved** shows 12.5M with a green check mark. Under **Variables**, observe that the optimizer has calculated the optimal combination of *Sales Plan* and *COGS* to reach the gross profit target.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F95svpHYAiCP7fMGlDYpa%2F4-optimized-variables-target-value-achieved.png?alt=media&amp;token=929d6c9a-827e-445b-9c64-d1da2ef442d6" alt="" width="563"><figcaption></figcaption></figure>

5. Select **Apply**. The optimized values are written to the sheet.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2Fi0wPNdi4wOCV7ug9CWyG%2F5-planning-sheet-updated-optimized-values.png?alt=media&amp;token=e62a6f74-b946-4c02-8f85-bbcf380db71b" alt=""><figcaption></figcaption></figure>

6. In the **Planning** ribbon, select **Show Columns** and enable *2026 Sales Plan* and *2025 COGS*. The original and optimized columns appear side by side:

   * Sales Plan: $26.38m vs original $26.1m—an increase of $0.28m
   * COGS: $13.88m vs original $14.17m—a reduction of $0.29m

   Together, these two adjustments deliver the $12.5M gross profit target.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2Fr6JRTPkyyBqY1R5donjd%2F6-compare-original-baseline-optimized-values.png?alt=media&amp;token=2706caa8-b0e6-4c85-8409-af5f4ac7ac62" 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-tutorials/3-optimize-input-values.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.
