Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sudhakar_b
Partner - Contributor
Partner - Contributor

Issue with Rolling 12 Months

I'm basically trying to show the sum of a measure for rolling 12 months. For some reason the set analysis is not evaluating properly.

When i select apr 2012, the graph should display from may 2011 to apr 2012

Any help is appreciated. i'm attaching the sample file for the same.

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Your issue is your inconsistent date formatting.  Set analysis respects date formatting so try this:

Sum({<MonthYear={">$(=Date(AddMonths(Max(MonthYear),-12),'MMM-YYYY'))<=$(=Date(AddMonths(Max(MonthYear),0),'MMM-YYYY'))"}>} Attritiioncount)

Also, for some reason you can't have a space either side of the red bit!

Hope this helps,

Jason

View solution in original post

2 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Your issue is your inconsistent date formatting.  Set analysis respects date formatting so try this:

Sum({<MonthYear={">$(=Date(AddMonths(Max(MonthYear),-12),'MMM-YYYY'))<=$(=Date(AddMonths(Max(MonthYear),0),'MMM-YYYY'))"}>} Attritiioncount)

Also, for some reason you can't have a space either side of the red bit!

Hope this helps,

Jason

sudhakar_b
Partner - Contributor
Partner - Contributor
Author

Hi Jason, Thanks... worked like a charm.