7.14 Calculate proportion using aggregation information of data of the same group

 

Here below is an annual and quarterly sales data table:

imagepng

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)

imagepng


https://c.scudata.com/article/1651916536524
https://c.scudata.com/article/1654990593574
https://c.scudata.com/article/1655083697022