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

To filter Rolling 12 Months data

Hi All,

I want to get only rolling 12 months data , can anyone help me with the calculation to put in Dimension ,

TIA

1 Solution

Accepted Solutions
Digvijay_Singh

As discussed you needed to show only last 12 months and it worked by using set expression as below -

Count({<[Order YearMonth={">=$(=Addmonths(Max([Order YearMonth]),-12))<=$(=Max([Order YearMonth]))"}>}[PO Number]

You may need monthstart() as well to show numbers from day 1 of the month.

Please close the thread by marking correct/helpful answers as many as you wish.

View solution in original post

8 Replies
MK_QSL
MVP
MVP

Anonymous
Not applicable
Author

I want to filter in dimension

MK_QSL
MVP
MVP

It would be easy to answer if you provide sample data or sample app.

Anonymous
Not applicable
Author

Digvijay_Singh

Hi Raman,

The link which mrkachhiaimp provided is something like everyone followed in similar situations. If you can share sample data, you may get exact expression by someone here. I personally prefer As-of-table script based solution, it is explained in detail in the same link.

Thanks,

Digvijay_Singh

As discussed you needed to show only last 12 months and it worked by using set expression as below -

Count({<[Order YearMonth={">=$(=Addmonths(Max([Order YearMonth]),-12))<=$(=Max([Order YearMonth]))"}>}[PO Number]

You may need monthstart() as well to show numbers from day 1 of the month.

Please close the thread by marking correct/helpful answers as many as you wish.

Digvijay_Singh

I fact looks like you don't need 2nd condition as I don't think you have any future data.

itec_pao
Partner - Creator
Partner - Creator

Hi all,

I have come across a solution, in order to provide a good moving annual total (MAT) analysis. The solution is called As-Of table. A very good example is provided here by Henric Conström:

The As-Of Table

Additionally, by using DateDiff (difference between the two dates), you might create different flags for flagging current 3months, 6months, 1Year, Ytd, etc.

Regards,

Oktay