11.13 Auto-aggregating in the case of multiple columns - unfixed number


Here below is a data table:


In this table, the number of value columns is unfixed, and may vary from time to time. Currently, there are four columns C~F, and we want to calculate the aggregation value of each column, and fill in the result in the blank cell below each group of data:

1 =‘A1:F15’.group@i(~-1==null)
2 for A1 =A2.select(~(1))
3 =B2|[A2.m(-1)(to(2))transpose(B2.(~.to(3,))).(~.sum())]
4 >B1|=B3
5 return B1


A1: Group whenever the previous cell in the first column is null.
A2: Loop through every group.
B2: Filter the aggregation row.
B3: Append aggregation result to B2.
B4: Append the result of each group to B1.

esProc Desktop and Excel Processing
11.12 Concatenate data within group into text
12.1 Use formulas to handle association