Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BI & Data Trends 2021. Discover the top 10 trends emerging in today. Join us on Dec. 8th REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Specialist III
Specialist III

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

Channa
Highlighted
Contributor III
Contributor III

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?