# Vizlib Line Chart Guides - Advanced Analytics: Forecasting

## Forecasting

The Vizlib Line Chart introduces forecasting capabilities in Qlik Sense with just one click away without the need for coding or a complex installation. Now equipped with 3 modes, predictive, linear and scenario analysis, forecasting with Vizlib is now more powerful than ever.

### What is forecasting?

Forecasting is a technique that uses historical data as inputs to make informed estimates that are predictive in determining the direction of future trends.

### Why use forecasting?

Using statistical modeling techniques, you can analyze the patterns in your past data and project those patterns to determine map future data points. Business need to make future decisions based on existing data. Here are some of the areas where you can make use of forecasting:

• Financial Planning
• Price Stability
• Demand Forecasting
• Supply Chain Management
• Sales Planning
• Scenario analysis

### Vizlib Line Chart Forecasting: Defining forecasts

 Enable Forecast Calculation.

#### Period Definition

• The Period Definition defines the number of data points that constitute a period. With days as data points, 7 would define a weekly period, 91 a quarterly period. With months as data points, 12 would represent an annual period.

#### Number of Training Periods

• This is the number of periods used to take into account when calculating the forecast.

#### Number of Forecasting Data Points

• This is the number of data points to forecast. The constraint for the maximum value is the period length × number of training periods x 0.5. The training period is the amount of source data used to calculate the forecast

#### Forecast Start Indicator

• Enable Forecast Reference Line Indicator to add a visual cue to indicate where the Forecasting period in your line chart begins.

## Predictive forecasting - Calculation Model

The statistical model used for forecasting is the Holt-Winters method also known as Triple Exponential Smoothing (see Holt-Winters Forecasting for Dummies for more information).

The Holt-Winters method analyzes the trend, average and seasonality of historical data to provide a statistical prediction for the future.

Further to this, Vizlib introduces different calculating models, starting from Quick: Minimal, to Intense. The lighter the model, the quicker the calculation time but the lower the resolution of the prediction. The heavier the model, the longer it takes to calculate, but the smoother the prediction will be.

 1. light 2. economic 3. standard 4. heavy

## Linear Regression

Commonly used for predictive analysis and modeling, a linear regression looks at the relationship between two variables by plotting a line through the observed data.  This type of analysis works best when there is a relationship between the two variables, for example, between age and height, or sales and advertising. We extend the line and continue the points that follow the regression line.

### Number of points to forecast

This setting affects all linear regressions for the chart object. All forecast lines must forecast the same number of points.

### Regression Period definition

Regression period definition refers to what data is used for the regression line. To use all of the data, you can simply use an expression to get the count of all of your dates (where your measure exists). In the example above, I have added a fain trendline, that perfectly matches my regression forecast line.

Different regression periods can be used, to draw different lines. This is particularly useful when benchmarking more recent performance versus a longer period of time, e.g. last 3 months, last 12 months, last 24 months.

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

## Scenario Analysis

Set up different future scenarios and work your way back to what that would mean for the business today.

Multiple linear or growth scenarios can be added for comparison. These can be added by expressions, which of course, means this can be driven by your data, as the application reloads or as you make selections.

### Linear mode

Linear offers the option to show growth of nominal values, between the last actual data point, to the data point at the end of the next defined period (i.e. 12 points later for a year, when data points are months)

Growth % mode

This mode is essential for scenarios where growth is accumulated/compounded. No more challenging Qlik expressions! Cumulative growth is essential for visualising month-on-month or year-on-year growth, typically for financial forecasts.

V
Vizlib is the author of this solution article.

Did you find it helpful? Yes No

Send feedback