Page tree
Skip to end of metadata
Go to start of metadata

Syntax

GROUPLAST(<any>; order by any)

Description

This function returns a value in a group as specified by the ordered column's last value.

  • If the column used to order the group is a number, then the value used from the order column will the highest number.
  • If the column used to order the group is a string, then the value used from the order column will be a lowercase letter starting with z and moving reverse alphabetically followed by uppercase letters reverse alphabetically. If no letters are present in the sting type, the value used will be the highest number.
  • If the column used to order the group is a date, then the value used from the order column will be the latest date.

This is an aggregate function

Example

Given the following data:

First create a group, e.g. GROUPBY(#RawData!Customer_num), and GROUPBY(#RawData!Name).

Using GROUPLAST(#RawData!Item;#RawData!Order), you can return the last item ordered by each customer.

 

  • No labels