Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mehek9074
Partner - Contributor II
Partner - Contributor II

last six months rolling window not working on month Selection in chart/filter.

Hi Folks,

I am using this logic to calculate last six month rolling window average from last month to its last six months.
RangeAvg(Below(total avg({<MonthStart=>}Overall_Score),-1,6))
(where monthStart Is my field name having values in the form of Month-Year)

e.g: value in November 2019 will be the : average of values in (oct 2019,sept2019, aug 2019, Jul 2019, Jun 2019, May 2019)
The logic is working fine, however, when I am selecting any month in chart or from filter,It is not diplaying that last 6 month rolled up value.
I am getting the original value for that month.
Can anyone help me on this?

Labels (2)
3 Replies
Anil_Babu_Samineni

What is the purpose you are using "MonthStart" as ignore field?

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
mehek9074
Partner - Contributor II
Partner - Contributor II
Author

Hi ,

 

I was using it to ignore the selections on monthstart field.Just for the try to freeze the values,so that it won't change if user makes anyselection.
If I remove it, then also I am not getting expected output on month selection.

Anil_Babu_Samineni

If you are using Month as filter, This won't work since this expression will give the static way but dynamic If we are not selecting any? Perhaps this

If(GetSelectedCount(Month)>0, Sum({1<Month = {">=$(=AddMonths(Max(Month),-6))<=$(=Max(Month))"}>} Overall_Score),RangeAvg(Below(total avg({<MonthStart=>}Overall_Score),-1,6)))

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