Hi,
I am trying to calculate sum of a metric for the previous year in QlikView pivot table.
The year is a dimension(listbox) which is selected by user-FYear
Tried a couple of combinations like below formula but not getting the results:
sum({<[FYear]={$(=Max([FYear])-1)>}[Qty]) ---gives nothing
Sum({<[FYear]={$(=AddYear([FYear],-1))}>}[Qty] ) ---gives zero
Try this, if its not work so please share some sample data.
sum({<[FYear]={"$(=Max([FYear])-1)"}>}[Qty])
HI Sumit, This totally worked. Thanks a lot.
Try this, if its not work so please share some sample data.
sum({<[FYear]={"$(=Max([FYear])-1)"}>}[Qty])
HI @AB108
I think, your FYear looks like below
in that case, you can use Dual() function and assign numeric values for FYear and then use max() function in set analysis, hope it helps.
HI Sumit, This totally worked. Thanks a lot.
Hi Mayil,
Fyear has straight up year values-2017,2018...
Corrected the expression, its working now.