6 Replies Latest reply on Aug 27, 2016 9:39 AM by David Li

    Help with creating a calculated field to aggregate sequential dates for hospital admissions

    Jason Cunningham

      I would love some help with creating a calculated field that will aggregate hospital admissions from a list of sequential dates.

      In the below example - I created a visual of total hospital days that a patient has been admitted by using a COUNTD for the dates of admission.


      I would like to create a visual that counts the total number of actual admissions from the listed dates.  For the below example, this patient had 7 hospital days but 3 distinct admissions - one from 12/14/2011-12/16/2011, next from 6/11/12-6/15/12 and the final from 3/31/13-4/1/13.


      QUESTION: How do I create a calculated field that counts the number of distinct admissions by adding up sequential dates? (Packaged workbook attached)



      Thank you!