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)
https://c.scudata.com/article/1651916536524
https://c.scudata.com/article/1654990593574
https://c.scudata.com/article/1655083697022
SPL Official Website 👉 https://www.esproc.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_Desktop/
SPL Learning Material 👉 https://c.esproc.com
Discord 👉 https://discord.gg/2bkGwqTj
Youtube 👉 https://www.youtube.com/@esProcDesktop
Linkedin Group 👉 https://www.linkedin.com/groups/14419406/