> 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/4-create-a-rolling-forecast.md).

# 3 - Create a rolling forecast

In this tutorial, you build a rolling 2026 forecast anchored on 24 months of actuals, generate a statistical forecast using the Trend Decomposition with MSTL algorithm, close January 2026 as actuals arrive, extend the horizon to January 2027, and commit the finalized forecast to a Fabric SQL database.

### Prerequisites

Complete the first three tutorials: [Introduction to planning in Microsoft Fabric](/planning-tutorials/1-introduction-to-fabric-planning.md), [Allocations and collaboration](/planning-tutorials/2-allocations-and-collaboration.md), and [Optimize input values](/planning-tutorials/3-optimize-input-values.md) before starting this tutorial. The plan app and the Fabric SQL database created in the previous tutorials are used here.

### Create a rolling forecast sheet

In this section, you set up the forecast planning sheet and create a blank forecast measure for 2026, ready to be populated by the statistical model.

1. In *Northwind\_FMCG\_Plan*, select **New Planning Sheet** in the **Home** ribbon. Enter *Forecast* and select **Create**.
2. Configure the field assignments:

| Field   | Value                                     |
| ------- | ----------------------------------------- |
| Rows    | Category → Sub-Category                   |
| Columns | Date hierarchy—Year, Quarter, Month Short |
| Values  | Gross Revenue                             |

3. In the **Filter** panel in the sidebar, apply a year filter for 2024 and 2025. Only these two years’ values feed into the statistical forecast.
4. In the **Planning** ribbon, select **Totals** and enable **Column Subtotal** on the left.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FjnRFbFDNXf5nQoCzuW9D%2Fimage.png?alt=media&amp;token=e75f866c-7c9f-42c4-877a-cda0b0b695e3" alt=""><figcaption></figcaption></figure>

5. In the **Model** ribbon, select **Forecast**.
6. Enter *Forecast* as the measure name. Set the *Forecast Period* to Jan 2026 to Dec 2026. Select **Next**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FPRyYytGiHQunIMEk9Crx%2F2-select-forecast-period.png?alt=media&amp;token=7151b338-3c2e-42d7-812f-79ee05fcac97" alt=""><figcaption></figcaption></figure>

7. In the closed period configuration, select **Link to Measure** and set **Source Measure** to *Gross Revenue*. This brings in the corresponding Gross Revenue actuals once a period closes. Select **Next**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FJuoNTgmOLxeIP2oKigoi%2F3-closed-period-source-gross-revenue.png?alt=media&amp;token=31e871ac-eb45-4ba5-aa07-ecbba5d06d18" alt=""><figcaption></figcaption></figure>

8. In the open period configuration, select **Data Input** and set **Default Value** to **None**. Leaving open periods blank allows the predict feature to populate the forecast using statistical methods. Select **Save**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FDh0BLGZjMbBo1LbRYrhV%2Fimage43.png?alt=media&amp;token=be98397a-4376-413d-9939-32ef6d4a3952" alt=""><figcaption></figcaption></figure>

9. Observe that the 2024 and 2025 forecast columns appear greyed out, indicating closed periods. The 2026 columns are open and empty, ready for the statistical model.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FwrYCi7SeXqzH7yMStwrW%2F5-forecast-created-closed-forecast-locked.png?alt=media&amp;token=a2302cf5-30a8-4801-9454-6dec62b64502" alt=""><figcaption></figcaption></figure>

### Generate the statistical forecast

In this section, you run the statistical forecast across the full Jan–Dec 2026 horizon using 24 months of historical actuals. The Trend Decomposition with MSTL algorithm detects seasonal patterns at both annual and quarterly cycles and generates a complete year of forecasted values in one pass.

1. Select the cell at the intersection of the *All* row and the Forecast subtotal column for 2026.
2. In the **Model** ribbon, select **Predict**. The Predict panel opens.
3. Use the lock icon to freeze the selection. Confirm **Row Selected** is *Grand Total* and **Select Measure** is *Forecast*.
4. Confirm the following default selections:

| Setting             | Value             |
| ------------------- | ----------------- |
| Historic data range | Jan 2024–Dec 2025 |
| Forecast date range | Jan 2026–Dec 2026 |

5. Configure the forecast as follows:

| Setting                           | Value     |
| --------------------------------- | --------- |
| Confidence                        | 90%       |
| Growth factor                     | 4%        |
| Evaluation                        | Bottom Up |
| Round all negative values to zero | No        |

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FTVE6x1YHDRwT5gCrQ9B6%2F6-predict-settings-evaluation-confidence.png?alt=media&amp;token=f0dc8fa3-19bf-499b-baf2-99ac1017786f" alt="" width="563"><figcaption></figcaption></figure>

6. Under **Choose Algorithm**, confirm **Trend Decomposition with MSTL** is selected. Under **Customize Algorithm**, select both **Year** and **Quarter** under **Set Seasonality**. This tells the model to detect and account for patterns at both cycle levels at the same time. Select **Run Forecast**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FeyxTjS1Jkxa9nMHUqElc%2F7-select-trend-decomposition-seasonality.png?alt=media&amp;token=2b561d19-7669-4048-bb5c-389333632b30" alt="" width="563"><figcaption></figcaption></figure>

7. The forecast preview appears—historical data in grey, predicted values in green, with the confidence range shown as green shading.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F7BQDhiSgHkdEiR9gRxgV%2F8-predict-values-preview-graph.png?alt=media&amp;token=81557f17-b456-4796-8892-8d0f8b18355b" alt="" width="563"><figcaption></figcaption></figure>

8. Scroll down to see the forecast table. Select **Save Forecast**.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2Fm8RPEnrw7WB985bFywmK%2F9-predict-values-actual-values-table-view.png?alt=media&amp;token=229bcd8b-0ca3-400a-9468-82b8c0a32a49" alt="" width="563"><figcaption></figcaption></figure>

9. Confirm the forecast measure and the date range, and then select **Save**. The statistical forecast is created with values calculated at the most granular level of the row and column hierarchies, then aggregated up to higher levels. 

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FRDbSFzABw3y7wK2TtHlL%2F10-statistical-forecast-created-using-predict.png?alt=media&amp;token=90160c5f-e735-4fae-a257-306f0e91f443" alt=""><figcaption></figcaption></figure>

### Close the period and extend the forecast horizon

In this section, you reveal January 2026 actuals, close the period to lock them in, extend the horizon to January 2027, and reforecast the newly opened month.

#### Reveal January 2026 actuals

In this part, you add 2026 to the year filter to reveal January's actual Gross Revenue alongside the statistical forecast. Comparing the two values shows how closely the forecast matched what actually happened.

1. In the **Filter** panel, edit the existing year filter and add 2026 alongside 2024 and 2025.
2. Expand the column headers and compare the two January 2026 values side by side:

* Forecast: $2.09m—the value generated by the statistical model
* Gross Revenue: $1.92m—the actual January figure

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FH25H4eOHaaxZnbcndqUJ%2F11-enable-revenue-actuals-2026.png?alt=media&amp;token=230fdf6b-8c68-4985-bead-13d1c627f840" alt=""><figcaption></figcaption></figure>

#### Close January and extend the horizon

In this section, you close January 2026 to lock in the actuals and extend the forecast horizon by one month. This keeps a continuous 12-month forward view as each period closes.

1. In the **Model** ribbon, select the **Period** dropdown and select **Close Period**.
2. In the **Close Period** dialog box, select the Close period till dropdown and select Custom. Set the period to Jan 2026.
3. Select **Extend Forecast Range** and set **Duration** to 1 Month. This maintains a continuous 12-month forward window—as January closes, January 2027 is added to the horizon.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F4N4fzp6jhTmrmWWrVpjZ%2Fimage51.png?alt=media&amp;token=1d4d7d3d-c33e-49d0-bcf5-f80849080950" alt="" width="563"><figcaption></figcaption></figure>

4. Select **Preview**. Verify the following, then click **Save**:

| Field         | Value              |
| ------------- | ------------------ |
| Measure       | Forecast           |
| Closed period | Jan 2024–Jan 2026  |
| Open period   | Feb 2026- Jan 2027 |

5. January 2026 is now populated with actual gross revenue and greyed out. The forecast horizon extends automatically to January 2027.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FI7wgPJIDgnwQ6LvT2fCZ%2F13-forecast-extended-2027.png?alt=media&amp;token=88c87a04-ddb1-45b0-a745-80f66b389762" alt=""><figcaption></figcaption></figure>

#### Reforecast January 2027

In this part, you reforecast the newly opened January 2027 period using January 2026 actuals as a baseline. This gives the extended month a realistic starting value instead of an empty cell.

1. In the **Model** ribbon, select **Reforecast** and select **Reforecast Column**. Configure it as follows and select **Apply**:

| Setting         | Value             |
| --------------- | ----------------- |
| Target period   | Jan 2027–Jan 2027 |
| Copy source     | Gross Revenue     |
| Apply operation | Single Period     |
| Source periods  | Jan 2026          |

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2Fd7LCbEdPeOgBeg5yqkjd%2F14-reforecast-configuration-single-period.png?alt=media&amp;token=f394d2e2-737e-40fa-b409-c9d469ab1ceb" alt="" width="563"><figcaption></figcaption></figure>

2. January 2027 is seeded from January 2026 actuals ($1.92M), giving a realistic baseline for the extended horizon.
3. Double-click the Jan 2027 grand total cell, enter +4%, and select the check mark. January 2027 is now populated at $2M.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FFE2FTH7uHXRRyvvDXO1B%2F15-reforecast-increase-value-four-percent.png?alt=media&amp;token=96af3c70-d49f-4218-8cc5-1e77026a5bbd" alt=""><figcaption></figcaption></figure>

### Commit the forecast to the database

In this section, you add a writeback destination, configure writeback settings, run writeback, and verify the results in the database.

For an overview of writeback concepts, see [Writeback | Plan](https://docs.fabricplan.com/documentation/plan/planning-sheets/concepts/writeback).

#### Add a writeback destination

In this section, you add the Fabric SQL database as a writeback destination for the forecast measure. This destination determines where committed values are written when you run writeback.

1. In the **Writeback** ribbon, select **Add destination**.
2. In **Create Destination**, configure as follows and select **Add**:

| Setting           | Value                                                |
| ----------------- | ---------------------------------------------------- |
| Select connection | Northwind\_FMCG (created in Tutorial 1)              |
| Database name     | Northwind\_FMCG\_Lisa Taylor (created in Tutorial 1) |
| Schema            | dbo                                                  |
| Table name        | Forecast                                             |
| Decimal precision | 2                                                    |
| Text length       | 512                                                  |

3. A confirmation message appears when the destination is added successfully.

### Configure writeback settings

In this section, you configure how the forecast is written to the database - the writeback type, which measures are included, and the destination. These settings determine what gets written and how each writeback run behaves.

1. In the **Writeback** ribbon, select **Settings**. The settings panel has four tabs—**General**, **Data**, **Destinations**, and **Advanced**.
2. In the **General** tab, select the information icon next to each writeback type to review the options:

| Type              | Behavior                                                       |
| ----------------- | -------------------------------------------------------------- |
| Long              | One row per observation. Full snapshot every run.              |
| Wide              | Each measure as a separate column. Full snapshot every run.    |
| Long with Changes | Writes only changed values. Builds an audit history over time. |
| Wide with Changes | Same as Wide but writes only changed values.                   |

3. Select **Long with Changes**. A warning appears confirming the destination will be turned off. Select **Proceed**.
4. Confirm **Filter type** is set to **None**—this writes back all data without filtering.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FBmj2G2qCnwQKpwOOHxlk%2Fimage.png?alt=media&amp;token=a82b74ad-399d-4c3b-b739-4b8b93a03484" alt="" width="375"><figcaption></figcaption></figure>

5. Select the **Data** tab. Deselect *Gross Revenue*—this is a read-only actuals measure and doesn't need to be committed to the database. Only Forecast should be selected.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2FS9EvuV0IsPiERMoHrEAo%2Fimage.png?alt=media&amp;token=cc4d1b27-489c-4e76-ae16-29eef7e8acf8" alt="" width="375"><figcaption></figcaption></figure>

6. Open the **Destinations** tab and select the Fabric SQL destination created in [Add a writeback destination](#add-a-writeback-destination).

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2Fafk9FUsfSdCM6OgNSAVn%2F17-select-fabric-sql-destination.png?alt=media&amp;token=6234c14b-3016-482a-b44d-84d6add1084f" alt="" width="375"><figcaption></figcaption></figure>

#### Run writeback and verify

In this section, you run writeback and confirm writeback saves forecast data correctly in the Fabric SQL database. You also review the writeback logs to see the run's status and details.

1. In the **Writeback** ribbon, select Writeback. A confirmation message that states, *Writeback Completed*, appears within a few seconds.
2. Open your training workspace folder and open the Northwind\_FMCG SQL database.
3. Expand **Northwind\_FMCG** > **dbo** > **Tables** and select the *Forecast* table. Verify the forecast data appears in the preview.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2Fwfw22KxlEgQgevYSpuMg%2F18-verify-forecast-writeback-fabric-sql.png?alt=media&amp;token=fa2883f2-ae3b-4fe8-b372-70dace3e8ef7" alt=""><figcaption></figcaption></figure>

4. Navigate back to the plan app. In the **Writeback** ribbon, select **Logs**. Review the log details—status, duration, user who performed the writeback, measures written back, and writeback type.

<figure><img src="https://257222532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUtolck8kt8atqxFPsEBn%2Fuploads%2F6nlSPmiFeOCa2snb4Epi%2Fimage.png?alt=media&amp;token=0cf052aa-81ba-4cfe-8111-9feb7df2d22f" 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/4-create-a-rolling-forecast.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.
