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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
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
Partner - Master II
Partner - Master II

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
Partner - Master II
Partner - Master II

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.