group-unique
Use the group-unique directive to create unique rows based on column criteria.
pebblestream:group-unique("Last name", "First name", ...)
All rows with the same "Last name" and "First name" are condensed to one, and only columns "Last name" and "First name" are included.
Can't be used with group, group-sum, or group-ratio.
group-unique is deprecated in all releases after v1. Use the group directive instead.
Consider the worksheet Transactions, which consists of customers' names and transaction dates.
First | Last | Date |
---|---|---|
John | Jones | 9/2/2020 |
Adam | Jones | 1/1/2000 |
Cathy | Albertson | 5/7/1990 |
John | Jones | 5/4/2013 |
Cathy | Albertson | 12/12/1999 |
the following code snippet will compute the set of unique names and place it in the Names worksheet.
pebblestream:from(Transactions)
pebblestream:group-unique("Last", "First")
Here is the result.
First | Last |
---|---|
John | Jones |
Adam | Jones |
Cathy | Albertson |
Updated over 2 years ago