Vizlib Home Try Vizlib

Vizlib Line Chart Properties - Advanced Analytics: Forecasting

The Advanced Analytics section of the property panel contains the forecasting settings for Vizlib Line Chart supporting a wide range of use cases that can be applied automatically. 

Using automatic forecasting gives you full control of the forecasting parameters for the chart, without having to code extensively or make complicated changes that require an advanced knowledge of data science. Figure 1 shows a line chart with automatic forecasting applied using the SARIMA algorithm. 

Figure 1: SARIMA Example


Forecasting uses existing data as inputs to make informed estimates on the direction of future trends, helping an organization make future decisions based on its historical data. 

Statistical modeling techniques can analyze existing patterns, use the forecasting feature to project those patterns to determine and map future data points. 

Businesses that can make productive use of forecasting include financial planning, demand forecasting, supply chain management, and scenario analysis.

Forecast Type

Vizlib Line Chart is equipped with three modes of Forecast Type: 

- Predictive, Linear Regression and Scenario Analysis

You can display forecasting settings by enabling Calculate Forecast (Figure 2). You can also select Show reference line indicator to highlight the start of the forecast in the chart (you can see an example with the Forecast Start line in Figure 1). 

Figure 2: Calculate Forecast


Back to Contents

Predictive Forecasting Algorithm - (S)ARIMA

Vizlib Line Chart uses the ARIMA model to support predictive forecasting scenarios, which stands for Auto-Regressive Integrated Moving Average. There are a wide range of reference materials for ARIMA, you can read more here. Vizlib Line Chart includes a Seasonal ARIMA option (SARIMA) and you can find more information on how SARIMA works here. You can also see an example SARIMA forecast in Figure 1

The main benefit of using a SARIMA algorithm is that you don't need to define any variables to run forecasting, you simply select one of the forecasting modes and display the forecast. 

Important: Unless you have an advanced knowledge of forecasting in analytics, we don't recommend making changes to any of the parameters or variables used in Forecast Settings (see below).

Back to Contents


Predictive is the default forecast type where you are offered a choice of Auto ARIMA, Advanced ARIMA and Seasonal ARIMA (Figure 3). This article is using Seasonal ARIMA as an example as it contains all the settings used in the other options. 

Figure 3: ARIMA Type

Forecast Settings (Figure 4) help you manage the parameters used in the forecast. The first three settings are simple parameters to help you project forecasts and adjust your forecasting model to your data. 

  • Period Definition defines the number of data points that constitute a period. For example, if days act as data points, 7 would define a weekly period and 91 a quarterly period. If months act as data points, 12 would represent an annual period. 
  • Number of training periods defines the number of periods used to take into account when calculating the forecast.
  • Number of points to forecast defines the number of data points to forecast. The constraint for the maximum value is period length × number of training periods x 0.5. The training period is the amount of source data used to calculate the forecast.

Figure 4: Forecast Settings

You can also choose an Arima method and Arima optimizer, but we don't recommend changing the default values unless you have an advanced knowledge of forecasting. 

There are also several numeric parameters with default values already in place (Figure 5) - the p Parameter, d Parameter, q Parameter, P Parameter, D Parameter and Q Parameter. Again, we don't advise making any changes to these values unless you have an advanced knowledge of forecasting.

Figure 5: Parameters

The Forecast Area settings control the look and feel of the forecast in the line chart (Figure 6) and allow you to enable a % Confidence Area, setting the Background Color, Area Background Color and Area Opacity, while Forecast Lines allows you to select a Line Color and a Line Style

Figure 6: Forecast Area, Forecast Lines

Back to Contents

Linear Regression

The Linear Regression forecast type looks at the relationship between two variables by plotting a line through the observed data, and works best when there is a relationship between the two variables (e.g. age and height, sales and advertising). For the forecast, you extend the line and continue the points that follow the regression line. You can see an example in Figure 7, which uses a trendline that perfectly matches the regression forecast line. 

Figure 7: Linear Regression Example

When you select linear regression (Figure 8), you'll be able to set the Number of points to forecast which affects all linear regressions for the chart object. All forecast lines must forecast the same number of points.

Figure 8: Number of Points to Forecast

When you create a linear regression object (Figure 9), you'll be able to set the Regression period definition which refers to the data used for the regression line. You can also set the Line Color

Figure 9: Linear Regression

To use all the data, you can use an expression to get the count of all of your dates (where your measure exists). We've included an example here:

=count(distinct {<Sales={">0"}>} Date)-1

You can add more than one regression period to the forecast by clicking Add Linear Regression, and using different regression periods to draw different lines. This is useful when benchmarking more recent performance versus a longer period of time, e.g. last 3 months, last 12 months, last 24 months.

Back to Contents

Scenario Analysis

Scenario Analysis forecast types allow you to set up different future scenarios and work your way back to what that would mean for the business today. There are two scenario types you can add to the forecast - Linear and % Growth. You can add multiple scenarios can be added for comparison, and you can also use expressions to make the forecast more data-driven (e.g. re-calculating when you make a selection).

Linear scenarios (Figure 10) can be used to show the growth of nominal values between the last actual data point and the data point at the end of the next defined period (i.e. 12 points later for a year, when data points are months).

Figure 10: Linear Type Example

To choose a Linear type (Figure 11), enter the Scenario Name, select the Measure you want to use for the forecast, then select Linear as the Scenario Type. You'll be able to enter an Increase Per Period, and choose a Line Color.

Figure 11: Linear

With Growth % scenarios (Figure 12), you can display scenarios where growth is accumulated and/or compounded, allowing you to visualize month-on-month or year-on-year growth, typically for financial forecasts.

Figure 12: Growth % Example

If you choose a Growth % type (Figure 13), you'll enter the Scenario Name and select the Measure to use for the forecast, then select Growth % as the Scenario Type. You can set the Growth per period (%) and choose the Line Color

Figure 13: Growth % Settings

Both scenario types have parameter settings to control the Number of points to forecast and the Length of Period (Figure 14). 

Figure 14: Parameters

Back to Contents

Predictive Data Export to XLSX

To export data to Excel (XLSX) on Qlik Sense or Qlik Sense Cloud (SaaS) with the forecasted data (see Figure 15)

  1. Right-click to open the context menu 
  2. Select Download 
  3. Export Data to XLSX with forecasting. This downloads the .xlsx file to your computer.
  4. The down
  • You can see what the downloaded file will look like by going to view the Attachment at the bottom of the page and downloading the file Vizlib Line Chart - Forecasting.xlsx.

Once downloaded you will have two sections of data.

  • On the left will be the original data with the Dimension names you have used.
  • On the right (what I have highlighted in the GIF) is the data that has your Dimension name and then Predictive (DimensionName: Predictive N°).

We have exported it in this way so you can create your charts within excel with the original unpredicted data and have a comparison chart with the predicted data.

Figure 15: Exporting

Back to Contents

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.