Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
paulyeo11
Valued Contributor II

SET expression instead of 1 can i enter 2016 ?

Hi Sir


I have below expression working fine :-


money(

SUM({<year = {'$(=Max(year)-1)'}, month = {"<=$(=IF(GetSelectedCount(month), Max({<year = {'$(=Max(year))'}>}month), Num(Month(Today()))))"}>}$(ColumnDim51)/$(Columndim89)/1000)

, $(vMoneyFormatK))



Now if i change the


Max(year)-1  it will display 2016 sales amount

Max(year)-2  it will display 2015 sales amount

Max(year)-3  it will display 2014 sales amount


May i know how to change thw above expression , so that when i


Max(year)-2016  it will display 2016 sales amount

Max(year)-2015  it will display 2015 sales amount

Max(year)-2014  it will display 2014 sales amount


In another work , i need the SET expression to replace


1 to 2016

2 to 2015

3 to 2014


Paul

2 Replies
paulyeo11
Valued Contributor II

Re: SET expression instead of 1 can i enter 2016 ?

my QVW

pradosh_thakur
Honored Contributor II

Re: SET expression instead of 1 can i enter 2016 ?

why do you need to replace the dynamic value with hardcoded value? if you want to replace than you should replace something like

Max(year)-1  with 2016

Max(year)-2  with 2015

Max(year)-3  with 2014

but this would make no sense as next year max(year) will be 2018 for and it will show you the unintended data .


regards

Pradosh

Learning never stops.
Community Browser