Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am pretty new to Qlikview, but have so far found a lot of usefull help by reading old posts - but I have now come to an issue I can't find a solution to, and hope you can help.
I have a set of data that I already using groubp by have aggregated to look something like below.
Year | Month | Value |
2011 | 4 | 1 |
2011 | 5 | 2 |
2011 | 6 | 3 |
2011 | 7 | 4 |
2011 | 8 | 5 |
2011 | 9 | 6 |
2011 | 10 | 7 |
2011 | 11 | 8 |
2011 | 12 | 9 |
2012 | 1 | 10 |
2012 | 2 | 11 |
2012 | 3 | 12 |
2012 | 4 | 13 |
2012 | 5 | 14 |
2012 | 6 | 15 |
I would like to have each month aggregated even further, so that the value of the month is the sum of the last 12 months, i.e. month 3 year 2012 should have a value of 78 (1+2+3+4+5+6+7+8+9+10+11+12). Likewise month 4 year 2012 should have a value of 90 (2+3+4+5+6+7+8+9+10+11+12+13) etc.
I want this to happen in the load script, so I can store the result as a QVD file to be loaded in other QV apllications. Naturally I have additional dimensions, and this aggregation should work for the other dimensions as well, meaing a last 12 month sum for product A and a last 12 month sum for product B.
I hope the example makes sense and you can provide me with the hints of a solutions, so I in the end can expand it over several countries and also calculated for last 52 weeks.
Regards
Soren
Hi
I think I found the solution, by further developing the script from the below post.
http://community.qlik.com/message/162306#162306
Regards
Soren