14 Replies Latest reply on Oct 28, 2012 5:42 PM by SILVIO MARTINEZ

    Need help on Calculation


      Can anyone help with the below?  I created a calculation for Length of Stay already (Discharge Date - Admission Date = LOS ) but I need it to add up the LOS Days.  The complexity is that there can be multiple admissions and discharges within the same period. 


      Below is an example.


               A                             B                           C                         = C - B

      NameAdmission DateDischarge DateLength of Stay (Days)
      John Doe9-2-20129-5-20123
      John Doe9-9-20129-15-20126
      Mickey Mouse9-3-20129-10-20127
      Mickey Mouse




      George Jungle9-8-20129-18-201210
      Winnie Poo9-19-20129-20-20121
      Felix Cat9-5-20129-25-201220



      Total Length of Stay in Septemeber is 51 days



      I have created a string for Name +  Admission + Discharge and used it as COUNT (Distinct) to get total discharges for the month (7 separate discharges in Sept) but now I need a sum for Length of Stay (Days)


      Can anyone help?  Attached a sample data and TDE & TWB.