Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacoby
Contributor
Contributor

Selecting data that exists over a range of dates

Hi,

I'm fairly new to Qlik, and I've been having trouble using the Date Picker extension to display my data in the way I need. The data I'm working with is job records with a start time and end time timestamp on each record. I would like to pick a range of 2 dates and return all jobs running at during this day. Is this possible to do?

I've been using the extension "Date Picker", which requires a Date field to do the filtering (currently set to the job's end time). However the problem I've run into with this is that a job won't display if I don't select the date the job ended. So for example, if a job ran for 10 days, I want to be able to select days 5-8 and still have this job show up.

 

Thanks!

3 Replies
ajaykakkar93
Specialist III
Specialist III

Hi,

Can you share a sample application with similar date field loaded so we could help you with it.

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

Jacoby
Contributor
Contributor
Author

Hi Ajay,

Thanks for your reply.

Unfortunately I'm on my company's corporate instance of Qlik Sense, so I can't download applications for sharing. I'll try to include as much detail as possible here though. I have attached a sample of the data I'm using.

This is what the "Date Picker extension" is using this field to filter dates, where "EVENT_TIME" is the end time for the record:  

Date(Floor([EVENT_TIME]),'YYYY-MM-DD') AS [Time]

 

I attached a diagram that might help explain what I'm trying to do. The way it works right now in my app is that only jobs 2 & 4 would be selected, because the 'end of the range' selected is before job 1 & 3's end time. I'm trying to make it such that any job that was running within the time range will get displayed. So something like:

 

IF ('job_start_time' < 'end_of_range' and 'job_end_time > 'start_of_range') //Case 1: Job's scope is larger than range

OR ('job_start_time' < 'start_of_range' and 'job_end_time' > 'start_of_range' ) //Case 2: Job starts before & ends during time range selected

OR('job_start_time' < 'end_of_range' AND 'job_end_time' > 'end_of_range')//Case 3: Job starts during range, ends after time range selected

OR('job_start_time' > 'start_of_range' AND 'job_end_time < 'end_of_range')//Case 4: job begins and ends within the scope of the time selection

 

clipboard_image_0.png

ajaykakkar93
Specialist III
Specialist III

Hi,

I have attached the latest extension & gif stating i am not facing any issues while selecting dates.

 

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting