Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
niharika1234
Creator
Creator

UI in Master calender

Untitled.png

I have created Master Ca-lender for years , attached is screen shot. I want to see only years from 2013 to 2019 and don't want any scroll bar. Please suggest.

Thanks,

Niha

 

 

 

 

7 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you create the calendar to have only years 2013 - 2019?  Or do you need the extra years for some other purpose in your app?

-Rob

Gysbert_Wassenaar

If you don't need the other years then don't load them.

Otherwise you could use an expression instead of the Year field for the listbox: aggr(Only({<Year={">=2013<=2019"}>}Year),Year). But perhaps creating an extra field in the load script and using that new field better suits your needs: If(Year>=2013 and Year<=2019,Year) as FilterYear.


talk is cheap, supply exceeds demand
niharika1234
Creator
Creator
Author

Thanks all. The Year is default from 2013 to 2050. Since eventually it will go on increasing for user point of view I want to restrict only 5 or 6 years . Yes i will try your option. Thanks,

Niharika

niharika1234
Creator
Creator
Author

Thanks.

It is better to have the year for future. But for user point of view 6 to 7 years are fine.

Thanks,

Niharika

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

It's generally a best practice to generate your calendar dynamically and create only the dates you need.  It makes your UI much simpler. 

You can generate the calendar completely at each script run limiting it to something like today().  Or you can load from a pregenerated calendar (like in a QVD) and filter as you load. Something like:

Calendar:
LOAD *
FROM calendar.qvd (qvd)
Where date <= today(1);

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

niharika1234
Creator
Creator
Author

Hello,

True From Extract layer I filtered the data between 2014 and 2022 and that worked. 

thanks

niharika1234
Creator
Creator
Author

Thanks. a very good idea.