Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Centered Moving Average in Qlikview?

Hi,

I would like to know how to create a centered moving average in qlikview.

So far, I have only been able to create a moving average looking a certain number of weeks into the past or future. This was using the

rangeavg(above(Sales,0,3))

Which looks 3 weeks into the past.

If i put a negative number in the offset, it will become a below( formula instead.

So what it is doing now is this:

WeekSalesMoving Average
110-
212-
3910,3
41512,0
52516,3

What I want it to do is this:

WeekSalesMoving Average
110-
21210,3
3912,0
41516,3
525-

Can anyone tell me how to do this?

Best regards,

Claus

1 Solution

Accepted Solutions
simenkg
Specialist
Specialist

How about:


rangeavg(above(Sales,0,2),below(Sales, 1, 1))



View solution in original post

2 Replies
simenkg
Specialist
Specialist

How about:


rangeavg(above(Sales,0,2),below(Sales, 1, 1))



Not applicable
Author

Thank you so much Simen - that works perfectly

You're my hero!