Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I am trying to build a visualization using the Variable Input present in the QlikSense Dashboard Bundle.
My question is I have a column called Year. So when I use the Variable Input and if I give 1 then it should show me 2019 and when I give 2 it should show me 2019 and 2018. If I type 3 then it should show me 2019,2018,2017 and so on. I don't want to do it manually.
I tried an expression by creating a variable vV1 = 1
Then used that variable in the expression as if($(vV1)=1 ,(max(year)), I am getting the solution as 2019 but When I am trying to give the second expression as if($(vV1)=2,(max(year)-1) and also I should get max(year).
Please suggest some solution. Thanks.
I think you are complicating this.
Try this for Year column:
= max(year) - $(vV1) + 1
Hi Lisa,
I am trying to get both 2019 and 2018 in one calculation.
Like max(year) and (max(year)-1) in one calculated condition