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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

need to display 24 Rolling Months from last month of data as a field RollingMonth

i need to display 24 Rolling Months from last month of data as a field "RollingMonth"..

Please help me..

1 Reply
MK9885
Master II
Master II

In Master calendar use

For Rolling 24 months:

If( YourDateFieldHere > monthstart(addmonths(today(),-22)) and YourDateFieldHere <= Today(),1) as [Rolling 24],

For Last Month:

if(InMonth(YourDateFieldHere, today(),-1), 1, 0) as LastMonthFlag,

and in front end use a Set Analysis function

sum or count as per your requirement and({<[Rolling 24],LastMonthFlag={1}>}.......)