# Goal Seek

In the last section, we looked into What-if analysis and simulations, which involved modifying or simulating one or more input values to obtain new output values or the totals.

Goal Seek is also a type of What-if analysis, except in this method, we specify the desired output or goal value to calculate the necessary input value to achieve the goal.

## Prerequsite

Row and column aggregation for native measures must be set to sum in order to use Goal Seek.

<figure><img src="/files/5G6q80tAIPdSLfyHjsyx" alt=""><figcaption><p>Setting row and column aggregation</p></figcaption></figure>

## Configuring Goal Seek

Let us take the following example, where the product revenue for each region is calculated by multiplying the sale price by the number of units sold. This is accomplished by [inserting a formula measure](https://docs.inforiver.com/working-with-inforiver/7.-planning-budgeting-and-forecasting/pages/kPw4PsuoSugYHl8DkMrV#id-1.-visual-measure) as shown below.

<figure><img src="/files/GieDgpWrodqXUICcNkUv" alt=""><figcaption><p>Revenue Calculation</p></figcaption></figure>

The formula measure gets inserted and the grand total is also calculated.

<figure><img src="/files/wKUnIdo2XLt1B6Ycoimk" alt=""><figcaption><p>Formula measure for Revenue inserted</p></figcaption></figure>

In the example above, the total revenue for the *Canada* region is 219.40m. Let us assume we are seeking a goal of 400m as the desired revenue.&#x20;

Now, for the desired ***revenue*** to be achieved through Goal Seek, we will choose to change one of its drivers - the ***Units Sold***. Note that you can change only one driver at a time. Therefore, let us keep the ***Sale Price*** fixed.

1. Input values in the native columns cannot be changed through Goal Seek. So we will create a [copy of it as a data input column](/working-with-inforiver/4.-adding-business-logic-and-formulae/insert-manual-input-columns/insert-manual-input-columns.md#ii-copy-from-another-series) to change it. In this example, a data input column has been created for the *Units Sold* driver.&#x20;

<figure><img src="/files/DTX8NT9TG5MO7ijr0jUd" alt=""><figcaption><p>Create Data Input Column for <em>Units Sold</em></p></figcaption></figure>

2. You can also update the formula accordingly by including this data input column (Units Sold) in place of the native column.

<figure><img src="/files/UlabQwB9zhxeZGjBdRzo" alt=""><figcaption><p>Data input column in the formula</p></figcaption></figure>

3. Click on the required cell (Canada>Grand Total>Revenue) and select **Insert -> Goal Seek.**

<figure><img src="/files/kjf4kjKDAxfo14XwLOs4" alt=""><figcaption><p>Click 'Goal Seek'</p></figcaption></figure>

{% hint style="info" %}
The goal seek option gets enabled only when you click on a cell containing a formula or aggregation like sum, product, etc.
{% endhint %}

4. In the pop-up window, enter the desired goal value of 400m.

<figure><img src="/files/boY3XoMeUhGynGUaLAUA" alt=""><figcaption><p>Enter the goal value for revenue</p></figcaption></figure>

5. Verify the target cell and its underlying formula. Then choose which of its drivers needs to be changed from the drop-down as shown below. We will choose *Units Sold* since we want to adjust the quantity sold to reach the desired revenu&#x65;*.*&#x20;

<figure><img src="/files/FlqakA0uVsjK4oK2IIgr" alt=""><figcaption><p>Select the driver to be changed</p></figcaption></figure>

6. You can either apply the changes to all input rows and columns or [choose which rows and column measures should be changed](#applying-goal-seek-results-to-specific-rows-and-columns) to meet the desired goal value. Let us first apply changes to all the input rows and columns.
7. Click **Run** and then **Apply** to make the changes.

<figure><img src="/files/5u4t5ZT9rY6S4VbTJ7cW" alt=""><figcaption><p>Apply Goal Seek</p></figcaption></figure>

A new set of values is updated for the *Units Sold* to meet the specified revenue. The new values of both measures - the units sold and the revenue are distributed to the child rows automatically.

<figure><img src="/files/4myrgu5yFUD9AS7DkpRK" alt=""><figcaption><p>Results of Goal Seek</p></figcaption></figure>

If you expand the column hierarchy, you can see that Inforiver also distributes the new values to the periods accordingly.

<figure><img src="/files/mRlKxiS2t6vtpxMLRd2E" alt=""><figcaption><p>Period-wise Distribution of the results of Goal Seek</p></figcaption></figure>

**Note:** Goal Seek can also be applied to measures in rows.

<figure><img src="/files/InOokONTLuy69oQ5tL5i" alt=""><figcaption><p>Goal Seek applied on measures in rows</p></figcaption></figure>

### Applying Goal Seek Results to Specific Rows and Columns

Assume you want to meet the goal value by modifying the values of specific products or business units during a particular time of the year. In such cases, you can choose which input rows and columns should be changed to achieve the desired result.

In the example below, we set the same desired revenue of 400 million for the *Canada* region. However, this time we intend to achieve this goal by increasing the sales of only the following products - *Amarilla*, *Carretera*, and *Montana*. We also want to change these values for the third and fourth quarters, excluding the rest.

This can be done by selecting the above-specified rows and columns as below.

<figure><img src="/files/bDsQ7vyJyLIOWUBcjCC9" alt=""><figcaption><p>Applying Goal Seek to selected rows and columns</p></figcaption></figure>

In the result below, only the selected rows and columns have been modified to meet the goal.

<figure><img src="/files/AaPeuyBxcMQ4EA4rZs3i" alt=""><figcaption><p>Results of Goal Seek</p></figcaption></figure>

**Note:** The goal seek function can also be used on formula cells referencing a column in their formulas - such as COLUMN.PARENT, COLUMN.TOTAL, etc.

In the example below, goal-seek is applied on the target cell which uses a formula with a column referencing function, [COLUMN.PARENT](/formula-syntax/identifiers/column.parent.md).&#x20;

<figure><img src="/files/chjTgs3xujv9PhbOc5Bd" alt=""><figcaption><p>Goal Seek is applied on a target cell referencing a column</p></figcaption></figure>

### Referencing forecasts

Inforiver can adjust open forecasts to match a defined target value. Let’s consider a report that captures the projected revenue based on the quantity and sales. The report contains a forecasted quantity field as well as a projected quantity data input field. The formula uses the projected quantity for closed periods and the forecast quantity for open periods. When you set a goal for the Revenue measure, Inforiver will adjust the forecast quantity to align with the goal.

<figure><img src="/files/mgGJwmHUKXebMncwAwfz" alt=""><figcaption><p>Forecast measures in goal seek</p></figcaption></figure>

## Goal seek for calculated rows

Suppose you have a calculated row that refers to a data input or forecast row. In that case, you can use Goal Seek to automatically adjust the input row to achieve the desired result based on the row-level formula.

In this report, we have a Total formula row based on a native row and a forecast row.

<figure><img src="/files/Gq5s1OPubN9TFuTGrpOK" alt=""><figcaption><p>Calculated total row</p></figcaption></figure>

Let's use Goal Seek to update the total row value from -731.83 to 845.67.

<figure><img src="/files/McBgpK5qUCpWv8Yby6N5" alt=""><figcaption><p>Updating the total row using Goal Seek</p></figcaption></figure>

Notice how the profit forecast cell has been changed to 6.01k based on the goal set for the calculated row.

<figure><img src="/files/aOyjqcag4OzUAMC4QSqB" alt=""><figcaption><p>Goal seek applied on the calculated row</p></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.inforiver.com/working-with-inforiver/7.-planning-budgeting-and-forecasting/goal-seek.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
