Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
SuwerenPL
Contributor II
Contributor II

Just another rolling average challenge

Hello,

I'm stuck in an attempt to create a deviation from rolling average line chart (and a table as a byproduct).

The intended result would be:

SuwerenPL_0-1707416392753.png

The chart must be responsive to selections  - max selected month excludes later data, other fields work normally.

So far I have tried the following:

SuwerenPL_1-1707416651857.png

=Sum(Aggr(RangeAvg(Above(Sum( {$<[Rok-Miesiąc]>} [Wprowadzone]), 0, 3)), [Rok-Miesiąc]))

=RangeAvg(Above(Sum({<[Rok-Miesiąc]= >}[Wprowadzone]), 0, 3))

=Sum({<[Rok-Miesiąc]=, [Data] = {">=$(=AddMonths(Max(Data),-3))<=$(=Max(Data))"}>} Wprowadzone)

[Wprowadzone] is just a counter field that after sum() corresponds to values in B column in the Excel example.

Nothing works as intended, averages are all over the place or just plain incorrect from my perspective. Any clue what I'm doing wrong would be much appreciated.

Labels (1)
1 Solution

Accepted Solutions
Lisa_P
Employee
Employee

I think you're making it too hard, try this:

RangeAvg(Below([Created in given month], 1, 3))

View solution in original post

2 Replies
Lisa_P
Employee
Employee

I think you're making it too hard, try this:

RangeAvg(Below([Created in given month], 1, 3))

SuwerenPL
Contributor II
Contributor II
Author

@Lisa_P That's what I was looking for 🙂 Thanks!