9 Replies Latest reply on Oct 10, 2018 8:57 AM by Don Wise

    Calculating Number of Active Patients at any Given Time

    Lisa Geller

      Hello All,


      I have a dataset of Emergency Department Patients that includes their arrival times and departure times (I cannot attach as it is healthcare information).  What I would like to do is build a highlight table that shows the # of patients in the department each hour so we can quickly see the busiest times in the department.  I would like the table to list the days of the week in rows and the hours of the day in columns.


      I am having some trouble trying to figure out how to calculate how many patients are in the department while accounting for new patients arriving and others leaving.  For example, at noon there are 10 patients in the ER.  Between noon and 1PM 2 people arrive and 5 people are discharged so at 1PM we have 7 patients in the department.  I believe I will need to use running totals but can't seem to get the numbers to work out.


      In addition, I would like to be able to adjust the dates that the table is looking at - which I think could be done easily using a parameter.  


      I did find this link:   https://kb.tableau.com/articles/howto/showing-records-that-fall-within-a-period-of-time but I'm not sure that it contains the information that I need to use. 


      I would really appreciate some help with this one.