Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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:
2. I have created the following variables:
3. I have created the following Variable inputs:
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:
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.
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:
2. I have created the following variables:
3. I have created the following Variable inputs:
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:
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.