MSDN Documentation

Time Series Algorithm

The Time Series algorithm in SQL Server Analysis Services (SSAS) is designed for forecasting future values based on historical data patterns. It's particularly useful for predicting trends, seasonal fluctuations, and identifying cyclical behavior in time-dependent datasets.

Overview

This algorithm leverages statistical models to analyze time series data. It identifies patterns such as trends, seasonality, and cycles to generate predictions. The algorithm supports multiple forecasting models, including:

Key Concepts

Data Requirements

To use the Time Series algorithm effectively, your data should have the following characteristics:

Algorithm Parameters

The Time Series algorithm offers several parameters to customize its behavior and improve forecast accuracy. Key parameters include:

Parameter Name Description Default Value Allowed Values
MODELING_TYPE Specifies the type of modeling to use for time series. ARIMA ARIMA, ARTMAP, LINEAR, ALL
MAXIMUM_SLOTS Controls the maximum number of models to generate when MODELING_TYPE is ALL. 10 Positive integer
LANGUAGE Specifies the language for error messages and output. 1033 (English) Valid LCID
INCLUDE_SLOTS_IN_SPECIFICATION Determines whether to include slots in the model specification. False True, False
SUPPORT_MAX_PREDICTION_PERIOD Maximum number of periods to predict. 100 Positive integer
PREDICTION_METHOD Specifies the method for generating predictions. SMART SMART, SINGLE_POINT, MOST_ACCURATE

Using the Algorithm

You can implement the Time Series algorithm in SSAS using:

Example DMX Query

Here's a basic example of how to create a time series mining structure and model using DMX:

CREATE MINING STRUCTURE [SalesForecastStructure]
(
    Date DATETIME,
    SalesAmount MONEY
)
WITH
(
    DrillThroughCols = None
);

CREATE MINING MODEL [SalesForecastModel]
ON SalesForecastStructure
WITH
(
    Modeling_Type = 'ARIMA',
    Maximum_Slots = 5,
    Include_Slots_In_Specification = False
);

Best Practices

For more advanced configurations and detailed parameter explanations, refer to the official SQL Server Analysis Services documentation.