Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with comparison with Rolling current year Vs previous Year

Hi

Please help me for this I tried to a lot for this but still I am in trouble to find the average of Rolling last 18 months data. Because when we fetch the data for current year rolling 18 months data it works fine and when I find separately previous year data then also it gives correct output but when I try to compare between them it gives wrong output. Because the current Year rolling month July 2012 matched by previous year July. 

2 Replies
Not applicable
Author

SET vMaxYear=MAX(Year)

Sum

({<Year={$(vMaxYear)},Month={"$(=Max({<Year={$(vMaxYear)}>}Month))"}>}  Value)    //Currentyear currentMonth

Sum

({<Year={$(=Max(Year(Year))-1)},Month={"$(=Max({<Year={$(vMaxYear)}>}Month))"}>} Value)    //PreviousYear CurrentMonth

Hope it will help u

Not applicable
Author

Hi Bika

Thanks for ur Reply but Bika It is not exactly that I want. Bika I want to display only 18 Rolling months difference for example current year starts from July 2013 to Feb 2012 and Previous Year starts from July 2012 to Feb 2011.