11.11 Group by interval of data values
Here below is a data table:
The task is to put every 5 days in a group, and calculate the average of the values in each group:
A | |
---|---|
1 | =E(‘A1:B19’) |
2 | =A1.Date |
3 | =A1.group@i(if(Date-A2==5,(A2=Date,true),false)) |
4 | =A3.new(Date,~.avg(Value):Avg) |
A2: Let the start variable of loop be the Date of the first row.
A3: Put every 5 days in a group.
A4: Calculate the average of the values in each group, and the Date means the first date of each group.
esProc Desktop and Excel Processing
11.10 Group when meeting non-null value
11.12 Concatenate data within group into text
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/