7.6 Accumulate data in each group
There is a sales data table:
To calculate the cumulative sales of each person, the code is as follows (calculate in cell D1):
=spl("=E(?1).new(cum(~~+Sales;Name):'Cumulative Sales')",A1:C22)
cum(x; Gi,…) is an iteration function, used in the loop function; x is an expression containing ~~; ~~ represents the cumulative value; Gi is an ordered column, and group by Gi and accumulate within the group.
esProc Desktop and Excel Processing
7.5 Simple accumulation
7.7 Filter by Accumulation
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/