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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Meg00
Contributor III
Contributor III

avg rolling 3 without current

Hi!

I'm trying to find a way to create a master measure,  avg "Amount"  rolling 3 months without including the current selected month. 

 

Is there anyone who can help?:) 

1 Solution

Accepted Solutions
Meg00
Contributor III
Contributor III
Author

Solved this by making a periodcounter and as below:

 

sum({$< PeriodCounter= {">=$(=max(PeriodCounter)-3)<=$(=max(PeriodCounter)-1)"}, Year=, Month=, Period=, CalendarDate= >}Amount)/3

View solution in original post

3 Replies
Anil_Babu_Samineni

Create "Master Measure" as below

Avg({=$(=AddMonths(Max(Month-1),-3))<=$(=AddMonths(Max(Month),-1))"}>} Amount)

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
Meg00
Contributor III
Contributor III
Author

the syntax provided doesnt work unfortunately. Still need help with this.

 

Rolling 3 months, without the actual(latest or selected). 

Example, today is period Jun 2019, 

Non selected I want the measure to show Amount for May 19+Apr 19+Mar 19 /3 (Max Month -1)

If I select May, I want the measure to show Amount for Apr 19+Mar 19+Feb 19 /3

 

Meg00
Contributor III
Contributor III
Author

Solved this by making a periodcounter and as below:

 

sum({$< PeriodCounter= {">=$(=max(PeriodCounter)-3)<=$(=max(PeriodCounter)-1)"}, Year=, Month=, Period=, CalendarDate= >}Amount)/3