Tableau, Show Me The Future
Forecasting (or predicting the future based on a previous set of data) is quite a useful technique in analytics.
Many people use these in a wide variety of ways and industries. The techniques you may be most familiar with in Excel are:
Linear Method - This is a best-fit straight line that is used with simple linear data sets. Your data is linear if the pattern in its data points resembles a line. A linear trendline usually shows that something is increasing or decreasing at a steady rate. This is my 2nd favourite and I would say the most popular method of automating forecasting in Excel.
Growth Method - This returns the predicted exponential growth based on existing values provided. It is categorized as a Statistical Function.
There are other ways you can forecast in Excel; using a 12 month rolling average based on your values, or flat-lining the last x months and taking an average.
Throughout my career in analytics (whilst using excel) I have used all of these and the most useful and near to the actual position is the 12 month rolling average. Forecasting can get as complicated as you like to make it, by including MFFs (Market Force Factors), growth, unexpected and external influences.
Tableau on the other hand can make this process a lot simpler by using the built-in Forecasting function. Tableau does not have a built in forecasting option that uses a 12 month rolling average, so if you want to use this option, then create it at source.
In Tableau, you typically add a forecast to a view that contains a date field and at least one measure. However, in the absence of a date, Tableau can create a forecast. Here's how:
To create a forecast, your view must be using at least one date dimension and one measure.
Enter the field you want for forecast on the Rows shelf, and ensure the Date is in the correct format on the Columns Shelf.
To turn forecasting on, right-click (control-click on Mac) on the visualization and choose Forecast >Show Forecast, or choose Analysis >Forecast >Show Forecast.
This will present the forecasting as a straight line, so we need to amend it slightly. There are 3 methods:
None—The component is not present in the model.
Additive—The component is present and is added to the other components to create the overall forecast value.
Multiplicative—The component is present and is multiplied by the other components to create the overall forecast value
Right click the canvas and select Forecast, Forecast Options;
In the Forecast dialogue box select 0 in "Ignore Last" box. This will ensure all months are calculated in the forecast.
Select Custom in the Forecast Model box. Otherwise it will use an Automatic method with or without Seasonality.
Select Additive or Multiplicative from the Trend box. You can also select to have %age prediction intervals. Once you have selected your choices, including the forecast length, it will look like this.
Forecasting does come with a health warning that you should note. It is only a prediction and is rarely 100% accurate. It is a guide, a direction of travel. If you follow this rule and the above steps, then you can't go wrong. Have fun and enjoy predicting the future.
Note: it does not work with lottery numbers.