# Ex8# Forecasting in Power BI

### Introduction

Forecasting is one of the most important areas for any business. You can forecast any metric like revenues, expenses, unit sales, demand, prices, and many more. This guide will demonstrate the important skill of forecasting using inbuilt capabilities in Power BI Desktop.

### Data

In this guide, you will work with a fictitious data set of bank loan disbursal across years. The data contains 3,000 observations and 17 variables. You can download the dataset . The variables to be used are described below:

1. `Date`: Loan disbursal date.
2. `Loan_disbursed`: Loan amount (in US dollars) disbursed by the bank.

Start by loading the data.

### Loading Data

Once you open the Power BI Desktop, the following output is displayed.

![b1](https://pluralsight2.imgix.net/guides/16c4cce1-5d1e-4c00-a4c0-34ee7dd58ccb_b1.png)

Click on **Get data** option and select **Excel** from the options.

![b2](https://pluralsight2.imgix.net/guides/044933be-9a35-4730-8384-d3c1eb1850cb_b2.png)

Browse to the location of the file and select it. The name of the file is **BIdata.xlsx**, and the sheet you will load is **BIData** sheet. The preview of the data is shown, and once you are satisfied that you are loading the right file, click **Load**.

![b3](https://pluralsight2.imgix.net/guides/0b295b3c-a9d4-4d8b-aea7-d84d9c14f75b_b3.png)

You have loaded the file, and you can save the dashboard. It is named **PowerBI Visualization**. The **Fields** pane contains the variables of the data.

![b4](https://pluralsight2.imgix.net/guides/7e56fe50-9d78-42b5-b82e-7ee3cdf26a86_b4.png)

### Creating Line Chart

Time series forecasting is visually represented with a line chart. So, to begin, you will add a line chart to the canvas. You can locate it in the **Visualizations** pane. Click on the **Line chart** and it will create a chart box in the canvas. Nothing is displayed because you are yet to add the required visualization arguments.

![ff1](https://pluralsight2.imgix.net/guides/b2f8b6e4-9611-424f-bf65-3a8363ed2922_ff1.png)

You can resize the chart on the canvas, and the next step is to fill the visualization arguments. Drag the `Date` variable to the **Axis** field, and the `Loan_disbursed` variable into the **Values** field. This will create the following chart.

![ff2](https://pluralsight2.imgix.net/guides/85e014ae-14ca-4861-86bb-21bd36584998_ff2.png)

You have created the time series chart named **Loan\_disbursed by Year**. The next step is to generate the forecast of future loan disbursal.

### Forecasting in Power BI

The **Forecast** capability in Power BI is in the **Analytics** tab.

![ff3](https://pluralsight2.imgix.net/guides/a5df91ac-055c-4134-919a-d9c53c2f8b61_ff3.png)

To add a forecast to the data, click on **Add** under **Forecast**

![ff4](https://pluralsight2.imgix.net/guides/0555157b-4e1e-49a3-afe3-78da2b9937fc_ff4.png)

You are required to enter the arguments. **Forecast length** specifies the length of the forecasting horizon. The **Confidence interval** specifies the confidence level that the forecast value will fall under the lower and upper bound. The following chart is generated, where the shaded grey region indicates the forecast.

![ff6](https://pluralsight2.imgix.net/guides/8954cce5-68d1-4b7b-a955-43927b375202_ff6.png)

Hover around the shaded region to see the forecasted value. In the chart below, you can see the forecast value for the year 2021, and the lower and upper bound of the forecast at 95 percent confidence interval.

![ff7](https://pluralsight2.imgix.net/guides/e797a58c-56ed-4127-9bcb-c6c7ef3f0ab8_ff7.png)

### Conclusion

Forecasting is a ubiquitous requirement for every organization, small or big. Business activities require forecasting ranging from sales forecasting to generating price forecasts. It is used in time series forecasting, stock price prediction, inventory forecasting, manpower planning, budgeting, and financial valuation areas. The knowledge of using the forecast capabilities in Power BI will add lots of strength to your analytics and business intelligence capabilities.


---

# 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://nishanthkp.gitbook.io/power-bi-tutorials/power-bi/ex8-forecasting-in-power-bi.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.
