11.8 Take adjacent data as grouping criteria
Here below is a data table:
The task is to group the data in the first column, and calculate the sum of the values in the second column of each group. Grouping criteria: when there is a difference of 5 or more between the current data and previous one, create a new group:
=spl("=E@b(?1).group@i(#1-#1[-1]>=5).new(#1:ID,~.sum(#2):Total)",A1:B12)
esProc Desktop and Excel Processing
11.7 Convert one-dimensional array to two-dimensional array
11.9 Group when meeting blank row
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.scudata.com
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/