Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi laffeyboy,
You can try to use set analisys expresion like that
sum({1<[Date] = {">=$(Date-365)"}-{"<[Date]"}>} Amount)
I hope to help you.
Hi Gregorio,
I've tried that and does not seem to work. The 'Amount' variable is the variable I want to sum, correct?
Yes Amount is the variable to sum, I try it in one of my qlikview repots and it´s work.
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.
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
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.
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
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.