Forecasting in Power BI

Forecasting in Power BI

A visual step-by-step guide to forecasting using Power BI.

In this post, we’ll go through the process of creating forecasting in Power BI.

Get the Data

You can download the dataset that I used?here. It contains daily female births in California in 19591.

Let’s load the data into Power BI. Open up Power BI and click on “Get data” on the welcome screen as shown below.

No alt text provided for this image

Next, you’ll be presented with another pane that asks what type of data we want to get. Select “Text/CSV” as shown below and click on “Connect.”

No alt text provided for this image

When the?File Open window appears, navigate to where we saved the dataset and click on the “Open” button on the lower right-hand corner.

No alt text provided for this image

When a preview appears, just click on “Load.”

No alt text provided for this image

We’ll now see the main working area of Power BI. Head over to the “Visualizations” panel and look for “Line Chart.”

No alt text provided for this image

this is what the line chart icon looks like:

No alt text provided for this image

Next, a visual placeholder will appear. Drag the hot corner marking on the lower right-hand corner of the placeholder and drag it diagonally down and to the right corner of the main working area.

No alt text provided for this image
No alt text provided for this image

Next, head over the “Fields” panel.

No alt text provided for this image

With the line chart placeholder still selected, find the “Date” field and click on the square box to put a checkmark on it.

No alt text provided for this image

We’ll now see the “Date” field under Axis. Click on the down arrow on the right of the “Date” as shown below.

No alt text provided for this image

Select “Date” instead of the default, “Date Hierarchy.”

No alt text provided for this image

Then, let’s put a checkmark on the “Births” field.

No alt text provided for this image

We’ll now see a line graph like the one below. Head over the Visualization panel and under the list of icons, find the analytics icon as shown below.

No alt text provided for this image

Scroll down the panel and find the “Forecast” section. Click on the down arrow to expand it if necessary.

No alt text provided for this image

Next, click on “+Add” to add forecasting on the current visualization.

No alt text provided for this image

We’ll now see a solid gray fill area and a line plot to the right of the visualization like the one below.

No alt text provided for this image

Let’s change the Forecast length to 31 points. In this case, a data point equals a day so 31 would roughly equate to a month’s worth of predictions. Click on “Apply” on the lower right-corner of the Forecast group to apply the changes.

No alt text provided for this image

Instead of points, let’s change the unit of measure to “Months” instead as shown below.

No alt text provided for this image

Once we click “Apply,” we’ll see the changes in the visualization. The graph below contains forecast for 3 months.

No alt text provided for this image

What if we wanted to compare how the forecast compares to actual data? We can do this with the “Ignore last” setting.

For this example, let’s ignore the last 3 months of the data. Power Bi will then forecast 3 months worth of data using the dataset but ignoring the last 3 months. This way, we can compare the Power BI’s forecasting result with the actual data in the last 3 months of the dataset.

Let’s click on “Apply” when we’re done changing the settings as shown below.

No alt text provided for this image

Below, we can see how the Power BI forecasting compares with the actual data. The black solid line represents the forecasting while the blue line represents the actual data.

No alt text provided for this image

The solid gray fill on the forecasting represents the confidence interval. The higher its value, the large the area will be. Let’s lower our confidence interval to 75% as shown below and see how it affects the graph.

No alt text provided for this image

The solid gray fill became smaller as shown below.

No alt text provided for this image

Next, let’s take into account seasonality. Below, let’s set it to 90 points which is equivalent to about 3 months. Putting this value will tell Power BI to look for seasonality within a 3-month cycle. Play with this value with what makes sense according to the data.

No alt text provided for this image

The result is show below.

No alt text provided for this image

Let’s return our confidence interval to the default value of 95% and scroll down the group to see formatting options.

No alt text provided for this image

Let’s change the forecasting line to an orange color and let’s make the gray fill disappear by changing formatting to “None.”

No alt text provided for this image

And that’s it! With a few simple clicks of the mouse, we got ourselves a forecast from the dataset.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了