Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

I need to create filter based on date.

 

I need to create filter based on date. In a table I want to show data with filtered on all dates from previous year until the end date of last full month this year, for example now in march I want the filter to only show data for the  period 2015-01-01 -  2016-02-29. 

 

Hope you understand my question.

 

 

Regards

 

Mårten

 

4 Replies
sunny_talwar

Gysbert_Wassenaar

See this video tutorial: Selecting Arbitrary Date Ranges


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

use to calendar objects one object to select your start date and other one to select end date.

Capture both the  dates in variables like vStart and VEnd.

and use set analysis like below:

=Only( if( MyDate >= $(vStart) AND MyDate <= $(vEnd), name )

or you can use set analysis as well...

Not applicable
Author

Thanks all!

I did a flag in the load of the data.

if(Datefield >= YearStart(AddYears(Today(),-1)), if(Datefield <= date(monthend(addmonths(Today(),-1))), 1,0)) as FilterFlag