Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Average Weekly

How can I get in a Straight table weekly average from a daily observation?

so from

2.png

to

3.png

I started with a cross table but then got stuck...

Many thanks

Raphael

1 Solution

Accepted Solutions
sunny_talwar

Try this

Dimension

=WeekEnd(Dates, 0, 3)

Name

Expression

Avg(Grade)

Capture.PNG

View solution in original post

15 Replies
Anonymous
Not applicable
Author

I meant not weekly average but rather 5 days average.

sunny_talwar

How are you coming up with 90 for Dan on 07/03/2018?

Anonymous
Not applicable
Author

07/03/2018 only 2 data in past so average of 80 and 100 = 90

14/03/2018 we have full 5 data points so average of 100,40,80,100,40 = 72

thanks

sunny_talwar

Try this

Dimension

=WeekEnd(Dates, 0, 3)

Name

Expression

Avg(Grade)

Capture.PNG

Anonymous
Not applicable
Author

Amazing!

Anonymous
Not applicable
Author

Sunny,

My requirement actually sometime may need to be instead of 5 day 9 days or 13 day or something else. I don't think that with WeekEnd I will be able to adjust, is there any other way that the '5' will be in the formula? thank you

sunny_talwar

You can do that, but against which date in the dimension would you want to group them? I mean how did you know that 07/03/2018 is the date which you want to see and not 06/03/2018?

Anonymous
Not applicable
Author

because I go by last date - which saw 11/04/2018 the this date + 4 dates above average and so on

Anonymous
Not applicable
Author

Guess best to do that in the load script itself rather than in the dimension?

What do you think?