Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
john_henry
Contributor III
Contributor III

How to dynamically restrict dates in a filter?

I have a date field with many dates going back to 2014, however I would like to limit those dates to display only dates from the last 2 months plus any future dates.  For example, today is 6/7/2019 and I would like to display data from 4/1/2019 and forward.

Date format is M/D/YYYY

 

2 Replies
Channa
Specialist III
Specialist III

=Sum({$<[Ship Date]={">=$(=MonthStart(Today(),-2))<$(=monthend(Today(),0))"}>}Sales)

Channa
john_henry
Contributor III
Contributor III
Author

thanks Channa!  I had to remove the <$(=monthend(Today(),0)) part so I can see all data out in the future.  This gets me closer, but still have to limit the dates that are displayed in the date filter.  Your set analysis helped me restrict my measure and the data that shows up in the table, but for some reason, when you open the filter, it shows all dates.  How can I also restrict the dates shown in the filter pane as well?