Description | The |
Syntax | LAG( |
Output | Varies based on input field type |
Variables
arg
: the field from which to fetch the previous value.
Example
LAG(Value
) with Row Offset 1
ID | Value | LAG |
1 | 10 | NULL |
2 | 20 | 10 |
3 | 15 | 20 |
4 | 30 | 15 |
5 | 40 | 30 |
Get the value of a specified field from a previous row in the dataset
Description | The |
Syntax | LAG( |
Output | Varies based on input field type |
arg
: the field from which to fetch the previous value.
LAG(Value
) with Row Offset 1
ID | Value | LAG |
1 | 10 | NULL |
2 | 20 | 10 |
3 | 15 | 20 |
4 | 30 | 15 |
5 | 40 | 30 |