Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter Date (a bit different than what I have seen)

So this is a date filter question. I want to have 2 calendar objects FromDate and ToDate - I want the user to click on these and hive it filter the model.

The thing is - I want the MinDate and MaxDate to be set from a 3rd table that has a bunch of information including a date key. I basically want to somehow get the min and max from that other table and use that as a minimum and maximum for my 2 calendar objects. Since there is no data before or after those dates - I only want my 2 calendar objects to be able to display as a minimum and maximum those values.

So for example in Table Values, my min date is 1/1/12 and my max date is 01/08/12. I want my FromDate calendar object to show the earlier date 1/1/12 and my ToDate calendar object I want to show a maximum of 1/8/12.

In all the examples I have seen the MinDate and MaxDate were set manually by the creator of the model.

Thanks!

1 Reply
Miguel_Angel_Baeyens

Hi,

As set in this application along with many other examples, you can use the functions Max() and Min() in the maximum and minimum date definition within the calendar object. Just make sure that all dates are in the same format, and you are done!

Both calendar objects will have these expressions in the min and max values (without quotes)

Minimum: "=Min(Table3.DateField)"

Maximum: "=Max(Table3.DateField)"

Hope that helps.

Miguel