Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
Showing results for 
Search instead for 
Did you mean: 
Not applicable

vLastYear and vThisYear question


I'm wondering if vLastYear and vThisYear is a universal thing in Qlikview or if it has to be set up in my Master calendar somehow?

Cause as it is right now I don't seem to get it to work. I'm trying some stuff out and found this expression I'm experimenting with but can't get it to work:

if(sum({$<Year = {$(vLastYear)}, Month = {"<=$(vThisMonth)"}>} LineSalesAmount) > sum({$<Year = {$(vThisYear)}, Month = {"<=$(vThisMonth)"}>} LineSalesAmount),


sum({$<Year = {$(vThisYear)}, Month = {"<=$(vThisMonth)"}>} LineSalesAmount) - sum({$<Year = {$(vLastYear)}, Month = {"<=$(vThisMonth)"}>} LineSalesAmount)


1 Reply

Re: vLastYear and vThisYear question

It is not a universal thing and these variables need to be created either in the script or using the variable overview