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: 
Not applicable

Issue with avg(aggr)

Hi sunindia‌,

For Jan 2016 the value is fine. When it comes to Feb I want to show the avg of Jan and Feb.

Present:

Jan 2016    Feb 2016

11445.36     11544.28

Expected:

Jan 2016    Feb 2016

11445.36     11494.82

Note: In the chart I only want to show data for current year.

Regards,

Aditya

1 Solution

Accepted Solutions
sunny_talwar

Try this:

RangeAvg(Above(sum({<[Report Date]={">=$(=Date(Yearstart(Max([Report Date]),-1)))"}>} [New Issuance Principal])/

Sum({<[Report Date]={">=$(=Date(Yearstart(Max([Report Date]),-1)))"}>}[New Issuance]), 0, RowNo()))


Capture.PNG

View solution in original post

4 Replies
sunny_talwar

Try this:

RangeAvg(Above(sum({<[Report Date]={">=$(=Date(Yearstart(Max([Report Date]),-1)))"}>} [New Issuance Principal])/

Sum({<[Report Date]={">=$(=Date(Yearstart(Max([Report Date]),-1)))"}>}[New Issuance]), 0, RowNo()))


Capture.PNG

Not applicable
Author

Sunny but going forward, say for Mar will the value be

Jan 2016    Feb 2016      Mar2016

11445.36     11494.82       Avg(11445.36+11494.82+value(Mar2016))

sunny_talwar

Yes it will be

sunny_talwar

In its current state, the expression will continue to do RangeAvg() forever