Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to calculate the values using lockperiod.
Lockperiod=0,2,3 but i am using this formula
=num(sum({$<Year = {$(=max(Year))},MonthID={$(=Max(MonthID)+Lockperiod)},Quarter=,Month=,Year=>} Arrivals),0.00).
Its not working.
I also tried by using variable but its working working for a specific lockperiod
Vlockperiod=2
=num(sum({$<Year = {$(=max(Year))},MonthID={$(=Max(MonthID)+Vlockperiod)},Quarter=,Month=,Year=>} Arrivals),0.00).
But i want to calculate for all lock period.
Regards,
Joshua.
Your +Lockperiod won't add further values to the dataset it will be interpreted as aggregation like a+b. Therefore try something like this:
=num(sum({$<Year = {"$(=max(Year))"},MonthID={"$(=Max(MonthID))", $(VLockperiod)} >} Arrivals),0.00)
This Quarter=,Month=,Year= is removed then it made no sense in a expression which determined excactly which periods should be calculated. Further I'm not sure if not something like this is enough if you have a unique MonthID for each monthly period:
=num(sum({$< MonthID={$(VLockperiod)} >} Arrivals),0.00)
- Marcus
hi Marcus,
Thanks for ur reply in variable wat u declare,
VLockperiod=0,2,3 lik that.
Regards,
Joshua.
Try if you get with manually entries your expected result: num(sum({$< MonthID={0,2,3} >} Arrivals),0.00). If yes go further and use a table-chart without a label for the expression with a variable which contained these 0,2,3 - within the label you could see how qlikview interpreted all parts of your expression.
- Marcus
Hi Marcus,
Thanks for ur Reply.
Happy New Year wish u a great year ahead.
Regards,
JOSHUA