Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
smithan04
Contributor
Contributor

Dates within a date range

Does anyone know how to get QlikView to filter a list of records, which contain individual dates, and compare them to a given date range?

I have a list of jobs and I want to know all the ongoing jobs between two dates. For example, between
1/1/2022 to 3/31/2022

Project Name                         Start                              End
Carlton                              1/2/2022                          2/15/2022
Jameson                          1/8/2022                          1/20/2022
Pernis                                2/15/2022                        5/5/2022
Mayers                              3/3/2022                           4/12/2022
Murphy                            3/16/2022                         3/22/2022
Henderson                     4/18/2022                         5/1/2022
Azers                                4/27/2022                          5/18/2022

Labels (1)
2 Replies
Ray_Strother
Support
Support

Hello ,

 

The date range picker looks to be the functionality you are looking for.

 

https://help.qlik.com/en-US/sense/May2022/Subsystems/Hub/Content/Sense_Hub/Visualizations/DashboardB...

Vegar
MVP
MVP

You can solve this by using InteralMatch().

Take a look at this script sample.

SET DateFormat='M/D/YYYY';

Projects:
LOAD * inline [Project Name, Start, End
Carlton, 1/2/2022, 2/15/2022
Jameson, 1/8/2022, 1/20/2022
Pernis, 2/15/2022, 5/5/2022
Mayers, 3/3/2022, 4/12/2022
Murphy, 3/16/2022, 3/22/2022
Henderson, 4/18/2022, 5/1/2022
Azers, 4/27/2022, 5/18/2022];

MasterCalendar:
LOAD Date, MonthName(Date) as Month;
LOAD 
dayname(yearstart(today())+recno() -1) as Date
AutoGenerate 365;

IntervalMatch(Date) 
Load Start, End Resident Projects;

exit script

.  It will give you this result when selecting January-March

Vegar_0-1654807030950.png