7.9 Accumulation for continuous occurrence of a certain condition
There is a statistical table for daily sales:
We want to add a column to the right to calculate the cumulative days of consecutive rising (calculate in cell C1):
A | |
---|---|
1 | =0 |
2 | return E(‘A1:B32’).new(if(Sales>Sales[-1], A1=A1+1,A1=0):RiseDayCount) |
A2: Take A1 as a temporary value. A1 plus 1 when the sales volume rises, and assign A1 to 0 when the sales volume falls.
esProc Desktop and Excel Processing
7.8 Early-terminated accumulation
7.10 Calculate using adjacent row/interval when data of the same group is continuous (link relative ratio and YOY)
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/