
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rolling 12 Months to Date vs Same Period Last Year
I'm new to QV. I need to have the 4 columns, similar to date wizard result but instead of year to date, I need the following running time periods (dynamic running to date):
Previous 12 Months / Last 12 Months / Change / Change %.
And Previous 52 Weeks / Last 52 Weeks / Change / Change %
I've tried modifying the wizard script for 6 months into 12 but it does not work.
Thanks for you help. Please do not attach a qvw file, my test edition does not allow to open. Just paste the script text.
Regards, Bill
- Tags:
- new_to_qlikview

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What's the difference between Previous 12 Months and Last 12 Months?
I assume that if we look at today, The Last 12 Months would be July 2010 - June 2011 and the Previous 12 Months would be July 2009 - June 2010? Is that correct?
In that case you could use the Addmonths() function and add a negative 12 (-12) or 24 (-24) as number of months. Try searching for "addmonths" in the forum to find some examples on usage.
