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

Qlik Sense rolling months with YearMonth selection

Hello,

I have troubles to implement 12 months rolling sum graphs in Qlik Sense. I have created the as-of table as described in this link: https://community.qlik.com/blogs/qlikviewdesignblog/2015/11/02/the-as-of-table . Rolling period calculation is also as in that guide: dimension: AsOfMonth, measure: Sum({$<MonthDiff={"<12"}>} Sales).

I get desired graph by selecting 12 months from AsOfMonth filter pane:12roll.jpg

The problem is, the whole app is designed to be used by selecting single month from the YearMonth-filter. When I make that selection, the graph looks like this:

12rollmonthyear.jpg

Without any filters, the visual looks like this:

12rolldefault.jpg

I would be grateful for any help. Thank you.

3 Replies
balabhaskarqlik

May be use these expressions:

Set Analysis for Rolling Periods

balabhaskarqlik

Try your expression like this:

num(Avg({<Month_Year>}Aggr(((Sum({<Month_Year = {"=Date#(Only({1} Month_Year), 'MMM-YYYY') >= AddMonths(Max(TOTAL Date#(Month_Year, 'MMM-YYYY')), -12) and Date#(Only({1} Month_Year), 'MMM-YYYY') <= Max(TOTAL Date#(Month_Year, 'MMM-YYYY'))"}>}a/b))*Only({<Month_Year>} c)), empid, Month_Year)

),'#.##')

kruel830
Contributor II
Contributor II
Author

Thank you for your response.

Can't get it work though. What are 'a/b' and 'c' in your example? And also 'empid' seems to be unrecognized function.