Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.09 KB

File metadata and controls

41 lines (30 loc) · 1.09 KB
title Lag (DMX)
description Lag (DMX)
ms.date 02/17/2022
ms.service sql
ms.subservice analysis-services
ms.topic reference
ms.custom dmx

Lag (DMX)

[!INCLUDEssas]

Returns the time slice between the date of the current case and the last date of the training set.

Syntax

  
Lag()  

Return Type

A scalar value of the type integer.

Remarks

If the Lag function is used on a model where the KEY TIME column is located within a nested table, the function must be located within the sub-select of the statement.

Examples

The following example returns cases that fall within the last 12 months of the data that was used to train the model.

SELECT * FROM [Forecasting].CASES  
WHERE Lag() < 12  

See Also

Data Mining Extensions (DMX) Function Reference
Functions (DMX)
General Prediction Functions (DMX)