11.3 Group by expression

 

Here below is a data table:

imagepng

We want to group and aggregate by the first two digits of ID, and calculate the total sales of each group:

=spl("=E(?1).groups(left(ID,2):ID;sum(Sales):Sales)",A1:C25)

imagepng


https://c.scudata.com/article/1651916536524
https://c.scudata.com/article/1656815995234
https://c.scudata.com/article/1656898103596