[]
This function returns the value of the argument from the last row of the window frame. It does not require ORDERBY.
LASTVALUE(value_function)
The function provides the following argument.
Argument | Description |
---|---|
value_function | [required] The field name or formula. |
// WINDOW(LASTVALUE([@sold]), PARTITIONBY([city]),ORDERBY([month]), FRAMERANGE(-1,-1))
city | month | sold | last_value
----------------------------------------------
Paris 1 500 400
Paris 2 300 400
Paris 3 400 400
Rome 2 200 500
Rome 3 300 500
Rome 4 500 500