Function that selects the first/last returned value of the expression argument.
Syntax:
FIRST (expression)
LAST (expression)
where expression is any expression.
You cannot use it in Logical SQL statements. It must be used in the repository.
By default, the FIRST/LAST function operates at the most detailed level specified of all dimension.
For example, if you have:
the FIRST/LAST function returns the first/last value for the combination day/store on each level. (i.e. even if the report asks a month summary for instance).
To limit the FIRST/LAST function, you must define an dimension-specific aggregation rules in the repository.
You should not use the FIRST/LAST function as the first dimension-specific aggregate rule. It might cause queries to occurs on large numbers of rows.