Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

last date only moving averaged display

I am looking for a 3 days moving average - I can calculate it,  using

rangeavg(above(sum(Score),0,3))

but I want to display only the result for the highest date.

so instead of

06-11-2017 16-19-57.png

I would like to see only the yellow highlighted one, when I try to filter my calculation changed since it is ignoring the non filtered. .

I tried to apply so set analysis to it but did not help.

Any idea?

1 Solution

Accepted Solutions
sunny_talwar

Enabled the other two expressions also

Capture.PNG

View solution in original post

13 Replies
sunny_talwar

Try this

rangeavg(above(sum({<MyDate>}Score),0,3)) * Avg(Aggr(If(Max(TOTAL <Name> MyDate) = MyDate, 1), Name, MyDate))

I have assumed that max mydate might differ for each name... if this isn't true, then you can have a simpler expression

trdandamudi
Master II
Master II

Please see the attached file.. (I am using version 12). Hope this is what you are looking for:

Anonymous
Not applicable
Author

Not matching original calculations?

moving average is

24/10/2017 Ben       75.33  and not like you have 100

24/10/2017 Julia      75.33 and not like you have 85

Anonymous
Not applicable
Author

Not matching original calculations?

moving average is

24/10/2017 Ben       75.33  and not like you have 100

24/10/2017 Julia      75.33 and not like you have 85

trdandamudi
Master II
Master II

Sunny do have the calculations that you need (75.33). Did you check ?

Anonymous
Not applicable
Author

no Sunny go something else? no? or am I very confused?

06-11-2017 17-22-52.png

trdandamudi
Master II
Master II

This is what Sunny is getting:

sunny_talwar

Are you not seeing this?

Capture.PNG

Anonymous
Not applicable
Author

when I open Sunny's Q (2).qvw

I get:

06-11-2017 17-28-52.png

maybe because I am using Q11 and Sunny is using Q12,any idea?