Forecasting is a result manipulation that uses patterns in your data to predict future results.
Forecasting uses values from date fields with at least two cycles of data. A cycle of data is a period broken down into multiple values. For example, a year is broken down by month or week. In auto-mode, the forecast will recognize each year as a cycle, so you need two years of data to generate a forecast.
This article contains the following topics:
Forecasting basics
Use this procedure to learn how to add a forecast to your report.
To add a forecast to your report
- In the report builder, create a time-based report. For example, you could add COUNT(Tickets) to the Metrics panel and Ticket created - Year to the Columns panel.
- Click the result manipulation icon (), then click Forecast.
- In the Forecast menu, check Calculate a forecast on the result
The options to configure forecasting are displayed.
- Path determines whether the forecast is based on the columns, or the rows in your chart. Whichever you choose must contain a date-based attribute. The path always contains the date-based attribute for your forecast.
- Under Method, choose either Additive trend and multiplicative season or
Additive trend and additive season.
To learn more about the forecasting methods you can use, see How forecasting works below.
- Under Values to predict, choose one of the following:
- Auto: Let Explore automatically calculate the optimum number of values ahead to predict.
- Custom: Specify the number of values to look ahead. For example, if your attribute is year based, you'll specify the number of years you want to forecast ahead.
- Under Values per cycle, you can configure the number of data points you include in each cycle. For example, for 12 months of data, you can select 6 values per cycle. If you select Auto, Explore calculates the optimum number of values to use.
- When you are finished, click Apply.
- From the visualization menu (), choose either a bar, column, area, line, or sparkline chart. Forecast results are not displayed on other chart types.
The forecasted porting of the chart is shown in a different style. For example, the forecasted portion of a line chart is shown as a dotted line, for example:
For example, if your report contains the attribute Ticket created - Month and you have been collecting data for over a year, then the values in this field are aggregated and you'll see the error message. Add the attribute Ticket created - Year also to resolve the error.
How forecasting works (advanced)
The forecasting method that Explore uses is based on the Holt winters model, which is a triple exponential smoothing that relies on the level, the trend, and the season of a time series.
Explore, uses two sub-models that fit most use-cases, and also take into account seasonal variations.
The AA method
The AA (Additive trend and Additive season) model is the default because it is the most commonly used, and produces the most realistic results.
Initial values are processed with the formula below:
Then, we can apply the Holt Winters AA model:
The AM method
The AM (Additive trend and Multiplicative season) model is, in some cases, a time-based trend.
Initial values are processed with the formula below:
Then, we can apply the Holt Winters AM model:
Periods per cycle
In the calculation, we also use the value “Periods per cycle”. It is used to determine the length of a season, needed to process seasonal indices. In the formulas above, this value is named “h”.
Smoothing parameters
Three other parameters must be defined before the processing of the forecast. They correspond to smoothing parameters, called “α” for the level, “β” for the trend, “γ” for the seasonality. In brief, they correspond to a ratio of the importance given to the firsts and lasts values of the time-based series, and will influence the results of each period. Here is an example:
“The estimated values of alpha, beta and gamma are 0.41, 0.00, and 0.96, respectively. The value of alpha (0.41) is relatively low, indicating that the estimate of the level at the current time point is based upon both recent observations and some observations in the more distant past. The value of beta is 0.00, indicating that the estimate of the slope b of the trend component is not updated over the time series, and instead is set equal to its initial value. This makes good intuitive sense, as the level changes quite a bit over the time series, but the slope b of the trend component remains roughly the same. In contrast, the value of gamma (0.96) is high, indicating that the estimate of the seasonal component at the current time point is just based upon very recent observations.”
For the three optimization parameters, there is no official algorithm to find the best ones. This turns into a NP-Complete problem, where the optimization problem is to minimize the mean squared error of the forecasted results, with 0≤α≤1, 0≤β≤1, 0≤γ≤1.
Thus, Explore has its own algorithm to find in a linear time the best three parameters, with an accuracy of 0.01.
13 Comments
Hi @... and thank you for the article! I am currently in the process of writing a master thesis on tickets' volume forecasting and I was wondering if Zendesk's metrics of forecast (MAE, MAPE, etc) are somehow accessible? It would help me a lot to evaluate my work.
Best,
Jacopo Castello
Hi Jacopo Castello, these are not accessible from within the product (and I can't see them either), but I'll open a ticket on your behalf to see if it's possible to get you that information. You should hear from us soon. Thanks!
Thank you @..., I've just seen the request that you created, really appreciated!
You're welcome! And good luck with the thesis :-)
I've followed the recipe to create a ticket volume forecast based on created month (including the year at the top to resolve the "missing_year" issue but I am running into another issue I can't get around, which is "You need to have data for at least 2 cycles to forecast your result. Your current cycle length is 1". I see others have as well, but no solution was presented for it. Here's my set up, how do I fix this? I want to see the forecast for the next 6 months based on the past 6 months of data.
Hi Radu,
Upon checking the screenshot that you have provided, the Ticket created - Year and Ticket created - Month attributes are currently under the Columns section while the Forecast Path is based on Rows which currently does not contain any date-based attribute.
This is how you should set up the forecasting for the next 6 months based on the past 6 months:
And this is how it should look like afterward:
Hope this helps! Cheers! :)
Hi there, Zendesk Team!
I was trying out the tutorial above and am currently scratching my head at finding the following results:
Is there something I'm doing wrong here - or is my company in trouble? 🤣
Thank you in advance!
Hi @...
Your company isn't in trouble :)
Indeed those results seems odd, I created a ticket for you in order to take a look directly at what went wrong. You should receive a notification about it soon.
This chart doesn't look right because it jumps up in value drastically.
That definitely seems odd. You are using the recommended attribute year and week.
I'll create a ticket for you to investigate on this one further. Please wait for my update via email and let's start from there.
Following the tutorial and unable to get results either. I get the error "You need to have data for at least 2 cycles to forecast your result. Your current cycle length is 2"
Edit: You get this error if you have forecast set to rows not columns. One problem solved!
I'm now in Week 3 of Support trying to understand why this tutorial, and the tool in general, don't work. :\
It would be great if you could specify a specific date to forecast up to rather than a fixed number of values. This would help me create neat quarterly forecasts which I can set up and leave without the data going beyond the quarter.
Please sign in to leave a comment.