Discussion Board for collaboration related to QlikView App Development.
hi,
I'm new to Qlikview and am trying to get something I thought was relatively simple but seems bit difficult.please help me to get this.
i have year field(FY)-2016,2017,2018,2019
Variables : vMinyear and vMaxyear
have to calculate Revenue
suppose if i select 2016 output should be 2016 to 2019
if 2017: 2017 ,2018, 2019
2018: 2018 to 2019
i have tried like below
sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Revenue) but it showing selected year only.
same for Quarter
Please let me know how to achieve this via set analysis.
Thanks in Advance.
Chandra
Try below
In Variable overview
vMinyear =min(FY)
vMaxyear =max({1}FY)
Note the = i have put before the variable
use your expression as it is and it will work , if it doesn't let me know.
HI Lisa,
Thanks for your reply,
still its not working .
Regards,
Chandra
how does your vMaxyear and vMinyear look like?
When you select an year it will be automatically be the min and max year. You need the condition when 2017 selected is
>=2017 <=2019 right so to do that you need to change your vMaxyear defination , assuming it is just max(year) you need to change it to max({1}year), so this will not change with selection , if you need current year use year(today()) in the vMaxyear expression. You can leave vMinyear as it is then your expression shall work.
hi Thakur,
my variable is same as you told
=Max({1}Maxyear)
is anything wrong in expression.pls check
=sum({<FY={">=$(vMinyear)<=$(vMaxyear)"}>}Revenue)
Thanks,
Chandra.
Hi
How does your vMinYear looks like ? Is the field FY number please check that as well. Try and if it doesn't work we can work out a sample .
Thanks
Pradosh
@chandra63 wrote:my variable is same as you told
=Max({1}Maxyear)
Shouldn't your variable be =max({1}FY) ?
Hi Pradosh,
FY is field
FY
2016
2017
2018
2019
LOAD
Min(statistic_date) as MinDate,
Max(statistic_date) as MaxDate,
min(FY) as Minyear,
max(FY) as Maxyear
RESIDENT Revenue;
vMinyear=min(FY)
please check this vMinyear variable. is it right?
Thanks & Regards
CHANDRA
Try below
In Variable overview
vMinyear =min(FY)
vMaxyear =max({1}FY)
Note the = i have put before the variable
use your expression as it is and it will work , if it doesn't let me know.