Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
My QS Doc have last 20 year data.
I like to have a button to filter only analyse last 5 year data or 20 year data.
May i know how can i use it , instead of using 2 seperate Doc.
Paul
If its taking along time to do a simple filter selection why don't you create a bookmark of the predefined 5 year filter, call it last 5 years and save your app with the filter applied that way when you open the document its always filtered on the last 5 years.
Regards
Andy
May be use this as action -> Select in Field
Search String: ='>=' & Max({1}Year) - 4 & '<=' & Max({1} Year)
Just realized this is a Qlik Sense discussion. I am not very familiar with Qlik Sense Button actions, so not sure if what I prescribed will work or not
Hi Sir
QS have filter panel , but need to manually select year one by one very slow.
Paul
Sent from my iPhone
Hello,
I am not sure if I understood your issue, but you can try the following code:
if(Year>= START_YEAR and Year <= END_YEAR, Year)
Replace START_YEAR and END_YEAR as you need.
If the years are non consecutive you can try:
if(match(Year, 2000, 2005, 2010,2011), Year)
I hope it helps!
If its taking along time to do a simple filter selection why don't you create a bookmark of the predefined 5 year filter, call it last 5 years and save your app with the filter applied that way when you open the document its always filtered on the last 5 years.
Regards
Andy
I would rather tend to create additionally selection-fields within the script maybe with something like this:
ceil((year(today() - year) / 5) as FiveYearsPeriod
or
class((year(today() - year), 5)
or other kind of flagging the data.
- Marcus
Hi All
Thank you very much for all of you sharing , i will try out every approach.
Paul