Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jordan1
Contributor II
Contributor II

Button to select current hour

Hi,

I'm currently developing a dashboard which includes several buttons for users to make quick selections. One of these, for example, selects today's data using the simple expression =Today() on a  Date field.

My current problem is with attempting to create a similar button, but to select data from the last hour. I have a field available called "In Hour", which just shows each hour of the day in hh format. I have tried using several expressions to select the current hour from this field, currently  =Time(now(), 'hh'). However, nothing seems to trigger a selection, despite the fact that the same formula produces the correct value when placed on a KPI.

Does anybody know of a solution for this?

Thanks,

Jordan

1 Reply
edwin
Master II
Master II

is it possible your In Hour field is a number field and not a time field?  Time i believe will return a dual.  first i would try using a hard coded value in your action just to test the selection (make sure it is selectable from a list for In Hour), then maybe use num() function  to return the number component of your expression.  of course make sure your expression returns a selectable value