Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Calculating running average of previous 3 months

I am working in a QlikSense Dashboard where business has requested us for running average of previous three months for the metric calculation “Factory DEFOA DPPM”. When we are using RangeAvg function, the total column is showing as 0. Currently I have used the below expression to calculate the running average. Please let me know if we can get value in the total column in the metric table.

Num((sum(CaseID)/Num(RangeAvg(before(Sum({1<[Event Location] =,[Commodity Group]=,MonthName=,FiscalWeekStart=>}Volume), 1, 3)),'#,##0'))*1000000,'#,##0')

Have attached Metric view for reference. 

 

Labels (1)
2 Replies
Highlighted
Partner
Partner

Re: Calculating running average of previous 3 months

Hi

Try this

Num((sum(CaseID)/Num(RangeAvg(Above(Sum({1<[Event Location] =,[Commodity Group]=,MonthName=,FiscalWeekStart=>}Volume), 1, 3)),'#,##0'))*1000000,'#,##0')

Hope this helps

Thanks

Highlighted
Contributor
Contributor

Re: Calculating running average of previous 3 months

Thanks Kashyap, sorry this did solve my issue. I need column wise . Let me know if you can provide an alternate. Thanks again