title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | ms.custom |
---|---|---|---|---|---|---|---|---|---|
Lag (DMX) |
Lag (DMX) |
kfollis |
kfollis |
kfollis |
02/17/2022 |
sql |
analysis-services |
reference |
dmx |
[!INCLUDEssas]
Returns the time slice between the date of the current case and the last date of the training set.
Lag()
A scalar value of the type integer.
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.
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
Data Mining Extensions (DMX) Function Reference
Functions (DMX)
General Prediction Functions (DMX)