Extracts the value from a column that is a specified number of rows after the current value.

window value:NEXT(myNumber, 1) order:Date

Output: Generates the new column, which contains the value in the row in the myNumber column immediately after the current row when the dataset is ordered by Date.

window value:NEXT(col_ref, k_integer) order: order_col [group: group_col]

ArgumentRequired?Data TypeDescription
col_refYstringName of column whose values are applied to the function
k_integerYinteger (positive)Number of rows after the current one from which to extract the value

For more information on the order and group parameters, see Window Transform.

col_ref

Name of the column whose values are used to extract the value that is k-integer values after the current one.

Required?Data TypeExample Value
YesString (column reference)myColumn

k_integer

Integer representing the number of rows after the current one from which to extract the value.

 

Required?Data TypeExample Value
YesInteger4

Example - Examine prior order history