Returns the latest date found within a field or group. You can apply a filter to limit the rows in the search. You can also use MAX to return the largest numeric value or the highest string value in a field or group.
You can nest only one other aggregate function within MAX. You cannot nest aggregate functions in advanced mode.
Use only in mapping tasks.
Syntax
MAX( date [, filter_condition] )
Argument
Required/
Optional
Description
date
Required
Date/time data type. Passes the date for which you want to return a maximum date. You can enter any valid transformation expression.
filter_condition
Optional
Limits the rows in the search. The filter condition must be a numeric value or evaluate to TRUE, FALSE, or NULL. You can enter any valid transformation expression.
Return Value
Date.
NULL if all values passed to the function are NULL, or if no rows are selected (for example, the filter condition evaluates to FALSE or NULL for all rows).
Example
You can return the maximum date for a field or group. The following expression returns the maximum order date for flashlights: