3 Replies Latest reply: Dec 17, 2012 6:58 AM by Dietmar Janke RSS

    Weekly average of rates > set?

      Hello QVer,

      I'm calculating daily rates which looks like:

      =sum({$<...>}AAA/BBB)/count({$<...>} DATE) > results are rates.

      Now these daily rates I want them calculated as weekly rates.

      Let's say in simple words:

      Summarise those daily rates belonging to a calendar week and divide by counted days of each week in respect to possible incomplete weeks.

      01.01.2012    45,00%    45/1 day = 45% [for CW52, incomplete=1 day]

      02.01.2012    50,00%   

      03.01.2012    25,00%   

      04.01.2012    50,00%   

      05.01.2012    30,00%   

      06.01.2012    50,00%   

      07.01.2012    80,00%   

      08.01.2012    50,00%    335/7 days = 47,86% [CW1, complete=7 days]

      09.01.2012    100,00%   

      10.01.2012    100,00%   

      11.01.2012    50,00%   

      12.01.2012    100,00%   

      13.01.2012    50,00%   

      14.01.2012    100,00%    500/6 days = 63,33% [CW2, incomplete=6 days]

       

      I would like to wrap that calculation in one set regarding the above mentioned set.

       

      I tried a lot. Can anybody help please. Thanks.

      dj_skbs