Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
ssha1983
Contributor II
Contributor II

12 months moving average just for 1 season

Hi

I am in a bit of a dilemma and I am hoping someone can please help.

I need to calculate the 12 month moving average for just 1 season,. Each season is from Aug to Jul.

I am using the formula  to get the moving avg.

rangeavg(above(COUNT( DISTINCT [Document No.]),0,12))

If I select Fiscal Years 2016-2017 and 2017-2018, I get the right numbers.

However, I only need to display the numbers for this season (Aug-2017 onwards).

Can someone please help.

Thanks

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try something like:

Sum(Aggr(rangeavg(above(COUNT( {<FiscalYear>} DISTINCT [Document No.]),0,12)), [Month Year]))


If this doesn't help, try to share your sample qvw.

View solution in original post

4 Replies
Anil_Babu_Samineni

You need to work with

The As-Of Table OR Fiscal YearFiscal and Standard Calendar generation

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

Try something like:

Sum(Aggr(rangeavg(above(COUNT( {<FiscalYear>} DISTINCT [Document No.]),0,12)), [Month Year]))


If this doesn't help, try to share your sample qvw.

sunny_talwar

May be this

RangeAvg(Above(Count({<FiscalYear>} DISTINCT [Document No.]), 0, 12)) * Avg({<FiscalYear = {"$(=MaxString(FiscalYear))"}>}1)

ssha1983
Contributor II
Contributor II
Author

That worked. thanks!