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

How to show IDs which are in ready status within certain time range

Hello, I'm pretty new Qlik Sense user, and I'm making pivot table which shows those patients who have been in ready status between selected time range. I have columns OWNER_ID, START_TIME, END_TIME & STATUS. START_TIME & END_TIME are in hours, for example, 6.  OWNER_ID column contains those patients who have "ready status"

For now my time selection is made with filter pane and you can select "0-2 o'clock", 3-5 o'clock", "6-8 o'clock" et cetera. When I select a time range, for example 6-8 o'clock, pivot table shows those patients whose start time is 6, 7 or 8, but it should show those who have been in ready status between 6 and 8 o'clock. 

How to solve this? Thanks in advance.

More defined questions are welcome if needed.

2 Replies
justISO
Specialist
Specialist

Hi, depends on how you managed to get these ranges "0-2 o'clock", 3-5 o'clock"... you need to add additional AND condition for STATUS='ready'. So your expression could look like this:

if(START_TIME>=0 and END_TIME<=2 and STATUS='ready', '0-2 oclock', if(...

megasupermoon
Contributor III
Contributor III
Author

Ah, I should have mentioned in my queston that SQL code already selects rows where owner is in ready status. Sorry...