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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
everest226
Creator III
Creator III

max year rolling 12 months

I am using set Analysis trying to  get the data  of 12 months rolling but till last months only ,

my code

Count (DISTINCT {<Year={'$(=max(Year))'}, Month={"$(=month(date#(max({<Year={'$(=max(Year))'}>}Month)-1,'MM')))"}>} [user])

Labels (1)
11 Replies
sunny_talwar

Try this:

Count (DISTINCT {<Year, Month, MonthYear = {"$(='>=' & Date(AddMonths(Max(MonthYear), -12),'YYYY-MMM') & '<' & Date(Max(MonthYear),'YYYY-MMM'))"}>} [user])

everest226
Creator III
Creator III
Author

Thanks Sunny