Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
ronnyhu
Contributor
Contributor

How to put time selection boxes in qlikSense to select Start Time and End Time

Hello,

I am developing a QlikSense dashboard which needs to select a start time and an end time, and then show results based on selected time range.

We do not want to put 24 boxes  there for users to select hours.

Thanks

Ronny

 

 

Labels (7)
1 Solution

Accepted Solutions
Andrei_Cusnir
Specialist
Specialist

Hello,

 

There could be many ways to implement a similar use case scenario, however the one that worked for me is to use Variable input charts with drop down styles. Here are the steps that I have followed:

 

1. I have the following dataset:

SCREENSHOT

 

2. I have created the following variables:

SCREENSHOT

 

3. I have created the following Variable inputs:

SCREENSHOT

 

The first one is set to "vStartTime" and the second is set to "vEndTime", while both as set to "Drop down" for "Shown as".

 

4. For the Values of Variable inputs I have selected Dynamic and as expression I have used "=Concat(Timestamp(DateTime, 'hh:mm'),'|')". This will give us the list of all the times that the dataset has. However, if you want to have specific timeslots, then you can use the expression: ='00:00|01:00|02:00|03:00|etc.', where you are going to included all the 24 values for the times.

 

5. After that I have used the following measure expression in the table:

If(
  Timestamp#(Timestamp(DateTime, 'hh:mm')) >= Timestamp#('$(vStartTime)'
  and 
  Timestamp#(Timestamp(DateTime, 'hh:mm')) <= Timestamp#('$(vEndTime)'), 
  Value
  Null()

 

and the outcome is the following:

SCREENSHOT

 

As you can see, the values are displayed based on selection.

 

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members. 
 

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂

View solution in original post

1 Reply
Andrei_Cusnir
Specialist
Specialist

Hello,

 

There could be many ways to implement a similar use case scenario, however the one that worked for me is to use Variable input charts with drop down styles. Here are the steps that I have followed:

 

1. I have the following dataset:

SCREENSHOT

 

2. I have created the following variables:

SCREENSHOT

 

3. I have created the following Variable inputs:

SCREENSHOT

 

The first one is set to "vStartTime" and the second is set to "vEndTime", while both as set to "Drop down" for "Shown as".

 

4. For the Values of Variable inputs I have selected Dynamic and as expression I have used "=Concat(Timestamp(DateTime, 'hh:mm'),'|')". This will give us the list of all the times that the dataset has. However, if you want to have specific timeslots, then you can use the expression: ='00:00|01:00|02:00|03:00|etc.', where you are going to included all the 24 values for the times.

 

5. After that I have used the following measure expression in the table:

If(
  Timestamp#(Timestamp(DateTime, 'hh:mm')) >= Timestamp#('$(vStartTime)'
  and 
  Timestamp#(Timestamp(DateTime, 'hh:mm')) <= Timestamp#('$(vEndTime)'), 
  Value
  Null()

 

and the outcome is the following:

SCREENSHOT

 

As you can see, the values are displayed based on selection.

 

 

I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members. 
 

 

Help users find answers! Don't forget to mark a solution that worked for you! 🙂