Forecasting: what it is and how it works
Forecasting is the feature that allows crystal to predict future values based on existing, previously observed data. Examples could be: forecasting a store’s daily product sales per unit or average daily price, or a plant’s hourly capacity utilization.

How to request a forecast

To ask crystal to predict a value, users must simply ask a question by specifying only the end date for the time range filter, just like when asking for an overtime single line topic.
To activate the forecast function, of course, the date specified must be in the future, after the last one present in the topic.
An example of question to activate the forecast function might be:
“Show me the trend of sales until December 2022“.
crystal will at that point take some time to elaborate the forecasting, informing users that they will be notified when the operation is done.
Could not load image
When the forecast is ready, crystal will deliver it to the users, and, if the users are not on the advisor when the result gets ready, they will receive a push notification, with a message such as:
“You have a new Forecast to check!”
The forecast result will be presented as an overtime visualization, when the users open the notification by pushing the show button.
Could not load image
In the case the operation takes too long or there is no data enough to elaborate the prediction, crystal will advise the users that the forecast is not available and will encourage them to ask something else.
Could not load image

Forecasting: behind the scenes

What a forecast is and how it’s generated

When a forecast is requested, crystal downloads the topic related to the user question and uses the topic data to start the forecast computation.
Forecasting is a machine learning task that operates on a time-ordered quantitative metric. The goal is to predict the future sequence of values based on past historical values. The key idea is to extract relevant and meaningful patterns from the historical time series, for example values like trends or seasonality, and to project them consistently in the future. Not only crystal generates the most likely future values, but also provides statistical intervals, showing how certain she is about the forecasts.

How forecasts are processed and sent to the users

When the prediction is ready, the prediction data is added to the topic as another y series for the overtime visualization. Two other y series, one for the lower bound and another for the upper bound of the prediction interval, are also added. This visualization is then sent to the user via notification.


  • Forecasting is working only for overtime single-line topics without header values
  • It is compatible only with overtime topics with monthly and daily time aggregations.
  • This feature requires at least 18 months for monthly data and 270 days for daily data.
  • It is possible to forecast values in the future up to 12 points for monthly data and 60 points for daily data, depending on the number of data points.
  • Forecasting requires at least 80% of points to be different from zero for monthly data and 70% of points for daily data.
  • The forecasting model does not consider the first and the last points if the metric aggregation function is sum or count. This is because these points for a monthly or daily topic could contain only partial data. For example, if we have data only for the first half of the last month, the visualization would show a dip there, which might ruin the prediction.
We hope this article is helping you. Check out more from our tutorials!
If you have any questions about crystal’s features, you have encountered a problem or you would like to share your feedback, contact us using this form.
Copy link
On this page
How to request a forecast
Forecasting: behind the scenes