Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
Brip51
Creator
Creator

Select multiple years with On Open Trigger

 
3 Replies
MayilVahanan

HI @Brip51 

Try like this

MayilVahanan_0-1612092826197.png

 

='('&Max(Year)&'|'&(Max(Year)-1)&')'

Thanks & Regards,
Mayil Vahanan R
Brip51
Creator
Creator
Author

Hi Mayil,

Thank you for your reply especially since I accidently posted without details.

I think this will work.  I will test it.

I want to try and create the trigger based on the current year.  This is what I meant to post below-

 

I am trying to create an On Open Trigger that selects the last ten years based on the current year.

I currently hardcode the trigger with the years, but I cannot hardcode dates due to the requirement -I am using (2010|2011|2012|2013|2014|2015|2016|2017|2018|2019|2020) at the moment.

 

If I use this:  ='<=' =Year(Today()) No years are selected.  If I use the same syntax, but put use 2020 it works.  So =’<= 2020’ works. 

I have tried different syntax. =Year(Today()) works fine, but I cannot get <= to work with the Year(Today()).

 

Is it possible to do this in the triggers or do I have something wrong ?

 

Thanks,

Brian

Brip51
Creator
Creator
Author

Hi Mayil,

Thanks for your reply especially since my detail did not post for some reason.

I think this will work.  I will test.

I want try an expression where the selections are less than the current year.  The details of what  I meant to originally post are below :

I am trying to create an On Open Trigger that selects the last ten years based on the current year.

I currently hardcode the trigger with the years, but I cannot hardcode dates due to the requirement -I am using (2010|2011|2012|2013|2014|2015|2016|2017|2018|2019|2020) at the moment.

 

If I use this:  ='<=' =Year(Today()) No years are selected.  If I use the same syntax, but put use 2020 it works.  So =’<= 2020’ works. 

I have tried different syntax. =Year(Today()) works fine, but I cannot get <= to work with the Year(Today()).

Is it possible to do this isn a trigger ?  Do I have something wrong ?

Thanks again,

Brian