Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Dolly123
Creator II
Creator II

Rolling month

What is expression for Rolling Month of past 12 month & 6 month anyone can write the code here?

2 Replies
anthonyj
Creator III
Creator III

Hi,

If you're looking for an average over the last 12 months you can do like below:

sum({$<Date={">=$(=monthstart(today(),-12))<$(=monthstart(today()))"}>}Field)/12

So this sums the "Field" where the "Date" is greater than the start of the month from today's date, 12 months ago, and the "Date" is less than the beginning of the current month.

You may not need this depending on your requirement.

I have used monthstart() function but if you need the exact date, 12 months ago you can replace it with addmonths(today(),-12)

I hope this helps.

Thanks

Anthony

Dolly123
Creator II
Creator II
Author

Not Working