Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
rmendoza
Contributor II
Contributor II

Count patients by hours (start date 07:00)

Hello everyone

I'm having trouble with a new diagram. I need your help.

I need to count the number of patients in the hospital per hour. The admissions hours are from 07:00 to 07:00 the following day.

For example:
id in out
1 13.08.2025 07:00 13.08.2025 08:00
2 13.08.2025 08:00 13.08.2025 08:59

So at 7 there was one patient, and at 8 there were two patients.

Thank you in advance.

rmendoza_0-1755093826918.png

 

 

rmendoza_2-1755094038745.png

Thank you in advance.

RG.

Labels (1)
1 Reply
mikaelsc
Specialist
Specialist

you need to generate a calendar of several timestamps (1 every hour/half hour) 

and then use intervalmatch to "match" those timestamps with the in and out timestamps of your admissions. 

 

also - careful with "short" admissions (less than one hour) that wouldn't be caught by that technique. 

possibly use floor(timeIn,1/24) (or similar) to ensure that each admission is caught at least by one "master" timestamp.