Reputation: 1
I want to calculate the cumulative week sales in qlikview, when I click in number of week for example 3, it calculated automatically 1+2+3, but id doesn't work.
Here my expression:
Sum({=$(=vStart)<=$(vweek)"}>}aggr($(vNbOSales),NumSemaine))
But when I specify the number it work like this: vweek =3
Sum({=$(=vStart)<=3"}>}aggr($(vNbOSales),NumSemaine))
thank you for your help.
Upvotes: 0
Views: 901
Reputation: 1
first of all thank you EldadT for your help, I get the answer when you talk about what do I have in the variable.
The answer is:Count({$<TIME_KEY={"CURRENT"},NumSemaine={"<=$(=max(NumSemaine))"}>}
without douing sum before expression just add in set analysis
thank you again EldadT
And hope this help anybody else
Thanks
Upvotes: 0
Reputation: 932
In cases like this, you have to explicitly assign the week numbers;
create a variable that holds ALL the week numbers till the week you choose, i.e for week 4 that variable vWeeks
will look like vWeeks = 1,2,3,4
and then use that variable in your expression
Sum({<Weeks = $(vWeeks)>}aggr($(vNbOSales),NumSemaine))
Upvotes: 0