PREV
- PREV(field)[source]
Returns the previous value of a field within a table.
When used in a table, it retrieves the value of field from the previous row. If used outside a table context or if there is no previous row, the formula evaluates to an error.
- Parameters:
field (
Operand) – The field whose previous value is to be retrieved. If a formula is provided, PREV will evaluate it for the previous row.- Return type:
- Returns:
The value of field from the preceding row in the table.
``field`` — accepted types
BOOLEAN
BOOLEAN_ARRAY
BOOLEAN_MAP
DATE
DATETIME
DATETIME_ARRAY
DATETIME_MAP
DATE_ARRAY
DATE_MAP
DECIMAL
DECIMAL_ARRAY
DECIMAL_MAP
INTEGER
INTEGER_ARRAY
INTEGER_MAP
NULL
OBJECT
OBJECT_ARRAY
STRING
STRING_ARRAY
STRING_MAP
TIME
TIME_ARRAY
TIME_MAP
Return types
BOOLEAN
BOOLEAN_ARRAY
BOOLEAN_MAP
DATE
DATETIME
DATETIME_ARRAY
DATETIME_MAP
DATE_ARRAY
DATE_MAP
DECIMAL
DECIMAL_ARRAY
DECIMAL_MAP
INTEGER
INTEGER_ARRAY
INTEGER_MAP
OBJECT
OBJECT_ARRAY
STRING
STRING_ARRAY
STRING_MAP
TIME
TIME_ARRAY
TIME_MAP