In this recipe, you'll create a query that uses your existing ticket data to forecast an estimate of how many tickets you'll receive in future years. To be able to forecast results, Explore needs at least two cycles of data. A cycle is a period of time broken down into multiple periods. For example, if you are reporting by year, you'll need at least two years of data to generate a forecast.
This article contains the following sections:
What you'll need
Creating the query
To create the query
- In the Metrics panel of your blank query, click Add.
- From the list of metrics, choose Tickets > Tickets, then click Apply.
- In the Columns panel, click Add.
- From the list of attributes, choose Time - Ticket created > Ticket created - Year, then click Apply.
- Explore generates a chart showing the number of tickets created each year since you began collecting data. From the visualization type menu (), change the chart type to Line. You'll end up with something that looks like the following:
- Now, you'll add the forecast to your chart. From the result manipulation menu (), choose Forecast.
- In the Forecast menu, select Calculate a forecast on the result.
- Leave all other values in the menu at their default values. Explore regenerates the chart showing one year into the future. The forecasted portion of the line chart is shown as a dotted line, for example:
- Click the New query text, then enter a name for the query like Ticket volume forecast.
- Save your query.
You've now finished creating a simple forecasting example. In the next section, you'll dig a bit deeper into the forecasting options and customize the chart you just created.
Exploring forecasting options
In this section, you'll start with the ticket volume forecast chart you created and explore how the different forecasting options affect it.
To open the forecasting menu
- Open the Ticket volume forecast query you created previously.
- From the result manipulation menu (), choose Forecast.
The Forecast menu contains the following options:
Calculate a forecast on the results
Select this checkbox to turn on forecasting.
You can calculate the forecast based on the columns, or the rows in your chart. However, whichever you choose must contain a date-based attribute. In the example in this article, you added the Ticket created - Year attribute to the Columns panel, so in the Path drop-down list, select On rows.
If you want to test how the path works, try dragging the Ticket created - Year attribute from the Columns panel into the Rows panel. Then, change the path to On rows. You'll end up with a table (instead of a chart) showing the ticket volume by year with the forecast.
The Method drop-down list selects the type of calculation that Explore uses to calculate the forecast. You can choose from two methods, each of which might return different results.
Explore uses the Holt Winters model as a forecasting method. Explore uses two sub-models that fit most use-cases, the AA and AM models which also take into account seasonal variations. If you want to read more about Holt Winters and the two models, see Using forecasting to predict results.
For this example, choose Additive trend and additive season.
Values to predict
Choose the number of values that you want to predict. In our example, when this was set to Auto, Explore looked one year ahead.
Choose Custom and then set Specify the number of values to predict to 5. This will make the forecast look five years ahead.
Values per cycle
Finally, this setting configures how many forecasts to make over each time period. In our example, when this was set to Auto, Explore forecast one result each year. Increasing the values per cycle increases the detail of your forecast.
Choose Custom and then set Specify the number of values per cycle your data contains to 6. This will take 6 forecasts throughout each year.
You'll end up with a chart that looks something like this example:
For in-depth information about how forecasting works in Explore, see Using forecasting to predict results.