Hi all--long time Alteryx user but first time posting. I'm wondering if you could help me figure out a way to determine the amount of patients at any one time in our emergency department using start and end times.
Basically, if you were a patient, I want to know how many other patients are in the ED during your visit. I'm having a lot of trouble with the calculations.
Thanks!
PatientID | Arrival | Departure |
1 | 10:00 | 10:33 |
2 | 10:00 | 10:45 |
3 | 10:15 | 10:45 |
4 | 10:50 | 11:15 |
5 | 10:43 | 10:59 |
6 | 10:57 | 11:20 |
Desired Output
PatientID | Arrival | Departure | Max in Dept Min in Dept |
1 | 10:00 | 10:33 | 3 2 |
2 | 10:00 | 10:45 | 3 2 |
3 | 10:15 | 10:45 | 3 3 |
4 | 10:50 | 11:15 | 3 1 |
5 | 10:51 | 10:59 | 3 2 |
6 | 10:57 | 11:20 | 3 1 |