7.14 Calculate proportion using aggregation information of data of the same group
Here below is an annual and quarterly sales data table:
The following code is to calculate the proportion of each quarterly sales to the total sales of the year (calculate in cell D1):
=spl("=E(?1).group(Year).((a=~.sum(Sales),~.(Sales/a))).conj().new(~:Proportion)",A1:C21)
esProc Desktop and Excel Processing
7.13 String concatenation and aggregation
7.15 Generate number in each group
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/