Returns a table's first or last set of records.
The First function returns the first record of a table.
The FirstN function returns the first set of records of a table; the second argument specifies the number of records to return.
The Last function returns the last record of a table.
The LastN function returns the last set of records of a table; the second argument specifies the number of records to return.
First and Last return a single record. FirstN and LastN return a table, even if you specify only a single record.
When used with a data source, these functions cannot be delegated. Only the first portion of the data source will be retrieved, up to 500 records, and then the function applied. The result may not represent the complete story. A blue dot will appear at authoring time to remind you of this limitation and to suggest switching to delegable alternatives where possible. See the delegation overview for more information.
First( Table )
Last( Table )
FirstN( Table [, NumberOfRecords ] )
LastN( Table [, NumberOfRecords ] )
This formula returns the first record from a table named Employees:
This formula returns the last 15 records from a table named Employees: