Grouping data

GROUPLAST – Identify last record in group

134 views June 1, 2018 admin 0

Overview

This Custom Field returns the value of a given field for the last record in a group.

Syntax

GROUPLAST(‘GroupPath‘,’SortField‘,’FieldValue‘)

GROUPLAST(‘Parent Category:Child Category‘,’Price‘,’Description‘)

 

Element Description
GroupPath Group path, delimited by colons
SortField The field to sort the records in the group by.
FieldValue The field to retrieve the value from.

Example

GROUPLAST(‘Parent Category:Child Category‘,’Price‘, ‘Price‘)

This command will first sort the ‘Price’ field into ascending order and return the last ‘Price’ value.

Price GROUPLAST
12.80 17.79
15.00 17.79
17.79 17.79

GROUPLAST(‘Parent Category:Child Category‘,’Price‘,’Colour‘)

This command will first sort the ‘Price’ field into ascending ‘Price’ order and return the last associated colour.

Price GROUPLAST
12.80 Yellow
15.00 Yellow
17.79 Yellow

See also

GROUPCOUNT

GROUPCOUNTUNIQUE

GROUPAVG

GROUPMAX

GROUPMIN

GROUPSUM

GROUPRTOTAL

GROUPFIRST

GROUPISFIRST

GROUPISLAST

 

Was this helpful?