Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Rolling 12 month values

Hi there,

I've just started using Qlikview and I need to sum values by year and month over a 12 month period.So for example I have data for June 2012 and I want to sum this value and previous 12 months (so going back to July 2011). Can anyone tell me how I can do this? I saw a post on here where the guy made changes to the date info script. In my code  I just have a list of default set statements for the date etc followed by a load statement.

Many thanks

Adrian

8 Replies
Not applicable
Author

Hi laffeyboy,

     You can try to use set analisys expresion like that

sum({1<[Date] = {">=$(Date-365)"}-{"<[Date]"}>} Amount)

I hope to help you.

Not applicable
Author

Hi Gregorio,

I've tried that and does not seem to work. The 'Amount' variable is the variable I want to sum, correct?

Not applicable
Author

Yes Amount is the variable to sum, I try it in one of my qlikview repots and it´s work.

Anonymous
Not applicable
Author

In the chart below the expressions you will have no accumlate , full accumlation & accumlate . Enable Accumlate and give number of steps as 12 because rolling 12 months. see the screen shot for your reference. Hope that helps.

Not applicable
Author

The proble of viany solucion is that accumulate in every dimension value, if you use time dimensions the value grows every month, for example,

               Accumulate value

Jun 10        10

Feb 20        30

Mar 2          32

Anonymous
Not applicable
Author

Hi Laffyboy & Gregoria, if the above post does not satisfy the requirement then its better to do the aggregation at the backend . I mean in the fact table.

Not applicable
Author

Hi Vinay,

I've tried that and it does not work. It just sums for 2012 but not back as far as July 2011.

Regards

Adrian

Anonymous
Not applicable
Author

can you post any sample data and with sample application that would give us better understanding on what dimensions you are using and how the data is present in the application.