Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

3 Replies
sujeetsingh
Master III
Master III

Didint get what you want can you plz post a samplee

giakoum
Partner - Master II
Partner - Master II

please check attached solution

Not applicable
Author

Hello,

sorry but I'm looking for a set formula or sth. similar includung my daily rates calculation something like

=sum(aggr(sum({$<...>}AAA/BBB)/count({$<...>} DATE), ... , week)/ count(weekend-weekstart/24h))

May be I'm not right in formatting the aggr.

That expression should be y-axis [weekly %] and weeek the x-axis of a bar chart.

Regards dj