Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Moving Averages

Hi I want to show moving averages for 5 months in my table. The dimension is org_level. if a user selects 05 as month, I should show average(volume) of that month and 5 months prior to that month

.

I tried Rangesum(above(sum(volume),0,5)), but I am not getting the desired result.

   

ORG_LEVEL_2Client_StatusMonthYearvolumeDate
REAL ESTATEActive0420161664/1/2016
REAL ESTATEActive0720151797/1/2015
REAL ESTATEActive12201518112/1/2015
REAL ESTATEActive11201520011/1/2015
REAL ESTATEActive0820152138/1/2015
REAL ESTATEActive0520152255/1/2015
REAL ESTATEActive10201522810/1/2015
REAL ESTATEActive0220162372/1/2016
REAL ESTATEActive0920152409/1/2015
REAL ESTATEActive0620152566/1/2015
REAL ESTATEActive0320162863/1/2016
REAL ESTATEActive0120162991/1/2016
CORPORATE Active12201545012/1/2015
CORPORATE Active0420165204/1/2016
CORPORATE Active11201568411/1/2015
CORPORATE Active0120167321/1/2016
CORPORATE Active0820157528/1/2015
CORPORATE Active0220167972/1/2016
Labels (1)
2 Replies
sunny_talwar
MVP
MVP

May be this:

RangeSum(Above(TOTAL Sum(volume), 0, 5))

If that doesn't work, would you be able to provide more details as to what you got and what you wanted? May be a sample would be helpful.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps this document helps: Calculating rolling n-period totals, averages or other aggregations


talk is cheap, supply exceeds demand