Skip to main content
Returns the value from a following row at a specified offset after the current row within a partition. Category: window Syntax:
Returns: Same as input type Context Filtering: ✓ Yes

Parameters

Validation

  • Minimum parameters: 1
  • Maximum parameters: 2

Examples

Returns the sales value from the next row (1 row ahead).
Returns the price value from 3 rows after the current row.
Returns the revenue from 7 days ahead, useful for forward-looking comparisons.
  • Lag - Returns value from previous row
  • First - Returns first value in partition
  • Last - Returns last value in partition
  • RowNumber - Assigns sequential row numbers
Last modified on March 13, 2026