Forecast in Tableau

What is Forecast in Tableau?

If you are running a company, you will have to create forecasts with the data available. It is where the ability to forecast in Tableau comes in handy. Forecast in Tableau allows users to predict future trends based on the historical data available. In the Analytics tab, there are many things to forecast, such as sales forecast in Tableau. The sales forecast predicts the data in a custom range defined by the user or, if left to Tableau, for three years.

Here is an example using a forecast where you can predict the next two quartiles of trends and sales forecasts in Tableau.

Tableau Forecast - Graph

As you can see, it is in a downward trend, extending to the next quartile.

Key Takeaways
  • Forecasting in Tableau leverages time series data to predict future values using historical trends and patterns.
  • Forecasts are visualized as extended lines or curves beyond the available data, showing potential future trends.
  • They are helpful in anticipating outcomes and making informed decisions based on projected data trends and seasonality.
  • Tableau’s forecasts use exponential smoothing models, automatically adjusting for seasonality, trends, and data irregularities.
  • Accurate forecasting requires clean, consistent time series data and sufficient historical points for model reliability.

How to create a forecast in Tableau?

Follow these steps to learn how to create a forecast in Tableau.

Step 1: Start by creating a new workbook by opening the Tableau application and selecting “File” – “New” on the toolbar of Tableau.

Tableau Forecast - Step 1

Step 2: Drag and drop the chocolate sales dataset from the directory it is in. 

Tableau Forecast - Step 2

Another way to import data is to select the “New Data Source” or press Ctrl+D and select “Microsoft Excel.” It will open the Files application on your computer and navigate to the folder containing your dataset.

Step 2 - Data source
Step 2 - Folder

Step 3: After importing the dataset, go to the first worksheet to start working on it.

Step 3
Step 3 - Sheet

Step 4: Place the measures “Date” and “Product” in the “Columns” part and the dimension “Amount” in the “Rows” part.

Tableau Forecast - Step 4

Click on the ‘+’ near the feature “Year” to expand it to “QUARTER” of the feature “Year.”

Step 4 - Quarter

Step 5: Go to the “Analytics” tab. Drag and drop “Forecast” under the “Model” heading, as shown.

Tableau Forecast - Step 5

Step 6: Click on the down arrow button. Edit the colors of the forecasting made by Tableau.

Step 6

Step 7: Select the color for the “Estimate” part. Then, click “Apply” to make the changes in the graph.

Tableau Forecast - Step 7

It is the forecast for the 3rd and 4th quartile of 2022 by Tableau.

Tableau Forecast - Step 7 - Forecast
Tableau Forecast - Step 7 - 4th quartile

Examples

Examples of concepts such as forecasts in Tableau provide an excellent foundation for you to practice and use these concepts in conjunction with other Tableau functions.

Example 1: Identify Patterns with Trend Lines

Sometimes, you want to see the sales trend for every single product in your chocolate catalog. It is essential to have an idea of which units to manufacture more or less, depending on the trend forecast in Tableau. It can be done by following the example below.

Step 1: Open a new workbook and import the “Chocolate Sales” dataset. Move from the Data tab to the first sheet.

Example 1 - Step 1

Step 2: Place “Product” and “Date” in the “Columns” section. Then, right-click on “Date” and select “Month” instead of “Year.”

Example 1 - Step 2

Then, place “Amount” in the “Rows” component.

Tableau Forecast - Example 1 - Step 2 - Rows

Step 3: Switch from the “Data” tab to the “Analytics” tab. Then, drag and drop “Trend Line.”

Tableau Forecast - Example 1 - Step 3

As seen, there are many options to draw a trend line in linear, polynomial or even exponential smoothing forecast in Tableau. Tableau provides you with possible hints on which you can choose for your data. Since the graph of the amount is linear, it chooses the “Linear” trend line.

It is the trend graph for each chocolate product.

Tableau Forecast - Example 1 - Step 3 - trend graph - Chocolate
Tableau Forecast - Example 1 - Step 3 - Chocolate upward

The pattern is that products with dark chocolate go on an upward trend, and the other products go on a downward trend.

Example 2: Predict Future Values with Forecasts

The forecast process in Tableau can not only be used to detect trends and patterns but also estimate future values based on various calculations made by sampling the historical time dataset that it has. This can be used to predict the number of Airbnb hosts who have a 90-day vacancy in the coming years in Austin, Texas.

Step 1: Start by opening a new workbook. Then, use the Airbnb dataset of Austin, Texas.

Example 2 - Step 1

Step 2: Place the “Host Since” feature in the “Columns” section. Then, right-click on “Null” and select “Exclude.” It creates a filter where it excludes NULL values in this feature.

Example 2 - Step 2

Step 3: Place “Availability 90” in the “Rows” section.

Example 2 - Step 3

Step 4: After that, go to the “Analytics” tab. Drag and drop “Forecast” in the worksheet.

Example 2 - Step 4

Step 5: After creating a forecast, drag and drop a trend line to the worksheet.

Tableau Forecast - Example 2 - Step 5

Step 6: Afterwards, click on “Color” in the “Marks” tab. Click on “Edit Colors.”

Tableau Forecast - Example 2 - Step 6

Step 7: Select “Estimate.” Now, select your preferred color, and select “Apply.”

Tableau Forecast - Example 2 - Step 7

It is the forecasted value of the number of Airbnb with 90 days available in the years 2024-2025.

Tableau Forecast - Example 2 - Step 7 - graph

Example #3

Here, you can see how the Null values impact the median lines and forecast values using the Airbnb dataset. Seeing the difference between the Median and Average will help you detect outliers. If there isn’t a significant distance between them, then there is nothing to be concerned about. We can forecast the availability of an Airbnb for 60 days in Austin, Texas, in the coming years.

Step 1: Import the Airbnb dataset in a new worksheet. You will work on the dataset.

Example 2 - Step 1

Step 2: Place “Host Since” in the “Columns” tab and “Availability 60” in the “Rows” tab.

Example 3 - Step 2

Step 3: Switch to the “Analytics” tab. Then, drag and drop a Constant line into the graph.

Example 3 - Step 3

Step 4: Change the graph type to “Bar” by clicking on the graph type in the “Marks” tab and selecting “Bar” in the drop-down.

Example 3 - Step 4

Step 5: Then, add a forecast to the bar graph. Look at the image below.

Example 3 - Step 5

Step 6: Click on the Constant line and click on “Set Value” to change where you want the constant line to run.

Tableau Forecast - Example 3 - Step 6

Set the value of your choice.

Tableau Forecast - Example 3 - Step 7

Step 7: Double-click “Average Line” and “Median With Quartiles” to add them to the graph.

Tableau Forecast - Example 3 - Step 7 - Line

This is the difference between the Average line and the Median line in the graph.

Tableau Forecast - Example 3 - Step 7 - Graph

Step 8: Now, click on “Null” and click “Exclude” to delete the “Null” value from the bar graph.

Tableau Forecast - Example 3 - Step 8

As you can see now, the difference between the Average and Median lines has decreased considerably, and the Average line almost overlaps the constant line.

Tableau Forecast - Example 3 - Step 8 - coastline

You can see this by hovering over the constant and Average lines to see the values. You can see how close they are.

Tableau Forecast - Example 3 - Step 8 - median
Tableau Forecast - Example 3 - Step 8 - Average

This is the final graph with the forecast and the median and average lines.

Tableau Forecast - Example 3 - Step 8 - Graph

Important Things To Note

  • Analyze historical patterns and seasonal variations as Tableau uses these for its forecasting models.
  • Ensure the data is clean, complete, and relevant for forecasting and the time intervals are uniform (daily, weekly, monthly).
  • Use a reasonable amount of historical data to improve the accuracy of forecasts. More data typically leads to better models, especially for identifying seasonality.
  • Exponential smoothing forecast in Tableau is done by default, which is effective for many time series data but may only sometimes be suitable.
  • Don’t use data with gaps, outliers, or inconsistencies without proper treatment.
  • Avoid adding too many parameters or overly complex models that may fit the noise rather than the actual trend.
  • Don’t let forecasts become outdated. Regularly update them with new data and insights.
  • Present those forecasts which have adequate context and explanation.

Frequently Asked Questions (FAQs)

1. How to remove forecast in Tableau?

To remove a forecast in Tableau, go to the worksheet with the forecast and right-click anywhere in the worksheet, then, click on “Forecast” and untick “Show Forecast”.

FAQ 1

2. Why is forecast in Tableau not working?

There are many reasons as to why the forecast feature may not work in Tableau. Troubleshooting for these points will help you solve your error.

There may need to be more historical data points.
The periods in the dataset aren’t uniform.
There is no date/time field in the axis to perform a forecast.
Fewer than 5 data points.
There are NULL values or outliers in the dataset.

3. Why is my forecast a straight line in Tableau?

There are a few reasons as to why this may be the case:

• There are no trend patterns that can be detected by Tableau.
• The Historical data values are almost constant.

4. How accurate is Tableau forecasting?

The accuracy of Tableau forecasting depends on several reasons:

The quality of data.
A greater amount of historical data.
Use the correct model to suit the data patterns.
Number of outliers in data.

5. Why is forecast greyed out in Tableau?

The reasons for the greying out of forecast in Tableau are;

There is no date/time field in the graph.
Not enough data points.
There aren’t any continuous fields.
The date levels are inconsistent.

Download Template

This article must help understand the Forecast in Tableau formula and examples. You can download the template here to use it instantly.

This has been a guide to Forecast in Tableau. Here we learn how to create a forecast in tableau with examples, points to note and downloadable template. You can learn more from the following articles –

Tableau Functions

Tableau Bullet Chart

Tableau Filters

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *