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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
james
Creator III
Creator III

Macro On Open select Rolling 12 Months

sub OnOpen

set m=ActiveDocument.Fields("MonthYear")

Select ">"& ActiveDocument.Evaluate("Num(Monthstart(addmonths(today(),-12)))") & "<=" & ActiveDocument.Evaluate("Num(monthstart(today()))")

end sub

This code works fine, except it requires the MonthYear Field to be numeric…

Anyone have any other ideas to make this cleaner?

Thanks

James

0 Replies