How to Forecast Sales in Tableau
Predicting future sales can feel like pulling numbers out of thin air, but with the right tools, it's a data-driven process that can guide your business strategy. Tableau’s built-in forecasting feature uses your historical data to project future trends, helping you make smarter decisions about inventory, staffing, and marketing budgets. This article will walk you through exactly how to create, customize, and interpret a sales forecast in Tableau.
What Exactly is Forecasting in Tableau?
Before jumping into the steps, it helps to know what’s happening behind the scenes. Tableau’s forecasting feature isn't just drawing a line into the future, it uses a statistical method called exponential smoothing. In simple terms, this method analyzes your past data points - like monthly sales - and projects them forward.
The model is smart enough to identify two key components of your data:
Trend: The overall upward or downward direction of your sales over time. Are you generally growing, shrinking, or staying flat?
Seasonality: Predictable, repeating patterns or cycles in your data. For example, a retailer might see sales peaks every November and December, followed by a dip in January.
By understanding the trend and seasonality in your historical sales, Tableau can generate a statistically sound forecast, complete with confidence intervals to show you the likely range of future outcomes.
Preparing Your Data for a Reliable Forecast
A forecast is only as good as the data it’s built on. Before you even open the Analytics pane in Tableau, make sure your data is set up for success. You essentially need two things:
A Date Field: You need a continuous timeline. This could be daily, weekly, monthly, or quarterly dates.
A Measure Field: This is the number you want to forecast, like Sales, Profit, or Quantity Sold.
Here are a few best practices to follow:
Have enough data: The model needs enough history to recognize patterns. For seasonal data (like most sales data), a good rule of thumb is to have at least two full seasonal cycles. If your business has a yearly cycle, aim for at least two years of data. More is always better.
Ensure data quality: Check for significant gaps or obvious errors in your timeline. If a whole month is missing data, Tableau will try to fill it in, but the result might not be accurate. Outliers, like a one-time hundred-fold increase in sales from a viral post, can also skew the results.
Keep it consistent: Make sure the time intervals are consistent. If you have daily data, ensure every day is represented, even if sales were zero.
Taking a few moments to review your dataset can save you from a misleading forecast down the line.
Step-by-Step: Creating Your First Sales Forecast
Let's use the Sample - Superstore dataset that comes with Tableau to walk through the process. Our goal is to forecast future sales based on past performance.
Step 1: Build a Basic Time Series View
First, we need to create a simple line chart that shows sales over time. This will be the foundation for our forecast.
Connect to the Sample - Superstore data source.
Drag the Order Date field onto the Columns shelf.
Drag the Sales field onto the Rows shelf.
Tableau will likely default to showing YEAR(Order Date). To get a more detailed view, right-click the YEAR(Order Date) pill in the Columns shelf and select Month from the second section of date options (the one with the line chart icon). This ensures you’re using a continuous date, which is what the forecasting model needs.
Your view should now be a line chart showing the sum of sales for each month across all years.
Step 2: Add the Forecast to Your View
This is where Tableau makes a complex process incredibly simple. You don't need to write any formulas, you just drag and drop.
Navigate to the Analytics pane (it’s next to the Data pane on the left).
Under the Model section, find Forecast.
Click and drag Forecast from the Analytics pane and drop it onto the chart canvas. You'll see a box appear that says "Add a Forecast."
And just like that, Tableau extends your line chart into the future! The original data appears in a darker blue, while the projected forecast is shown in a lighter shade, along with a shaded area representing the confidence interval. This shaded area indicates the range where future sales figures are most likely to fall.
Customizing Your Tableau Forecast
The default forecast is a great start, but you have control over how it's calculated. By customizing the options, you can tailor the prediction to your specific needs or perform "what-if" analyses.
To access the settings, right-click anywhere on the forecast in your view and select Forecast > Forecast Options...
Adjusting Forecast Length
In the Forecast Options dialog, the first setting lets you control the length of the projection. Tableau defaults to forecasting for the next 13 months, but you can change this.
Choose "Exactly" to specify a set number of units (e.g., 2 years).
Choose "Until" to forecast up to a specific future point in time.
Excluding Past Data
The "Source Data" section lets you tell Tableau to ignore a certain period of historical data when building the model. This is useful if you have recent data that is an outlier and you don't want it to influence the future projection. For instance, if a one-off product launch caused an unusual sales spike last month, you could choose to Ignore last 1 month to get a more typical forecast.
Tuning the Forecast Model
This is the most advanced part of the customization. The Forecast Model option defaults to Automatic, where Tableau analyzes your data and chooses the best trend and season settings. Most of the time, this is the best choice.
However, you can select Custom to manually define the trend and season.
Trend: You can set this to None, Additive, or Multiplicative. An additive trend assumes growth is constant (e.g., you add $1,000 in sales each month). A multiplicative trend assumes growth is exponential (e.g., you grow by 5% each month).
Season: This can also be set to None, Additive, or Multiplicative. Additive seasonality means the seasonal fluctuations are a consistent amount (e.g., a $5,000 bump every December). Multiplicative seasonality means the fluctuations are a percentage of the trend (e.g., a 20% bump every December, which gets larger in dollar terms as overall sales grow).
Unless you have a strong statistical reason to change these, it's best to stick with the "Automatic" settings, which are highly reliable.
How to Check Your Forecast's Accuracy
How do you know if the model Tableau picked is any good? Tableau provides a quick summary of the model’s quality and parameters. Right-click your forecast again, but this time select Forecast > Describe Forecast...
This opens a window with two tabs: Summary and Models.
The Summary tab gives you a plain-English overview of the forecast, including the time period used for the projection, the measures being forecasted, and any data that was ignored.
The Models tab provides more detailed statistics. Don't worry if the terms look intimidating. The most important thing to look at are the error metrics, like MAPE (Mean Absolute Percentage Error) and MAE (Mean Absolute Error). The key takeaway is simple: smaller error values mean a more accurate model. You can use these numbers to compare models if you experiment with the custom settings. If you change a setting and the error metrics go down, you’ve likely made the forecast more accurate.
Common Mistakes and Final Tips
Forecasting is powerful, but a few common missteps can lead to poor results. Keep these tips in mind as you work.
Make sure your date is continuous. This is the most common mistake. If the date pill on your Columns shelf is blue, it's discrete. The forecast model won't work. Right-click it and change it to a continuous option (the ones with the green line chart or calendar icon).
Don't forecast on sparse data. If you only have six months of data, Tableau can't possibly identify a yearly pattern. Be realistic about what your data can tell you.
A forecast is a guide, not a guarantee. Predictions are based on past performance continuing into the future. They can't account for unexpected market shifts, new competitor launches, or a change in your own business strategy. Always use forecasts as one input among many for making your decisions.
Final Thoughts
You've now seen how to turn a historical sales chart into a forward-looking predictive tool with just a few drags and drops in Tableau. By creating a basic time series view, enabling the forecast feature, and customizing the options, you can generate valuable insights to guide your planning and strategy.
While learning tools like Tableau is a great way to handle in-depth analyses, the learning curve can be steep for those who just need a quick, clear answer. At Graphed, we've focused on simplifying this process entirely. Instead of configuring visualizations manually, you can connect your sales and marketing data sources and just ask for what you need - like "show me a sales forecast for the next 6 months," - and get a real-time dashboard instantly. We built it to give you the answers you need without having to become a data expert.