Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kdaniels-obrien
Partner - Creator
Partner - Creator

Date range picker relative time

Hi,

I am using the SenseDate Range Picker from the developer page.. I'm trying to solve an issue with relative time.  I want the dashboard to show today's data but if the dashboard is open over the course of 24+ hours I want it to refresh with the next days data.. For example: the date range picker has a selection of Today which is 1/16.. The dashboard is projected on a screen 24/7 so at midnight I want the dashboard to start displaying 1/17 data.

Note: I'm not using the Qlik Sense supported date range picker because when I select a day in the supported date picker, it chooses the following day.  So right now, I need solutions that work for the Sense Date Range picker which can be found at: https://developer.qlik.com/garden/5697a878dcc497f80ed514bf for reference

 

Thanks in advance!

Labels (5)
2 Replies
andoryuu
Creator III
Creator III

Perhaps not the answer you were looking for, I resolved the issue you describe with the Qlik Sense governed extension by converting my timestamp field using floor. For showing the dates with the times I use the original timestamp field, but for selection by the date range I do the following as a field in my data load:
timestamp(floor(timestamp#(session_start))) as SessionDateFilter
Use that field as your date in the date range picker and the "next day" selection issue goes away.
kdaniels-obrien
Partner - Creator
Partner - Creator
Author

I'm not sure if I fully understand the solution... So I use  timestamp(floor(timestamp#(logicalDate))) as logicalDate because my date picker is on that field and now when 'Today' is selected in the date range picker and the dashboard is left open over night it will automatically change the filter to the following day (which would then be 'today')? Or is there more I need to do?