1 Reply Latest reply on Oct 24, 2016 4:04 PM by Jonathan Drummey

    Calculation Help

    Ryan Peper

      Hey all - I am new to Tableau and am looking for some calculation help.  I am trying to calculate the average number of OP Therapy visits for our TKA and THA patients. In the simple example below George has 4 visits while Abe has 6 resulting in an average of 5 visits per patient for Dx Z96.652.  We would like to get an overall organizational average but also be able to filter it by site and physical therapists (which i am guessing i can just do by filters.)  any help would be much appreciated! 

       

             

      Pt First NamePt Middle InitialPt Last NameContact DateDXVisit DiagProvDept
      GeorgeAWashington8/1/2016Z96.652Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      GeorgeAWashington8/7/2016Z96.652Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      GeorgeAWashington8/12/2016Z96.652Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      GeorgeAWashington8/18/2016Z96.652Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      AbeBLincoln8/19/2016Z96.653Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      AbeBLincoln8/20/2016Z96.654Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      AbeBLincoln8/21/2016Z96.655Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      AbeBLincoln8/22/2016Z96.656Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      AbeBLincoln8/23/2016Z96.657Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
      AbeBLincoln8/24/2016Z96.658Status Post Left Knee RepalcementJackson, AndrewABC Physical Therapy
        • 1. Re: Calculation Help
          Jonathan Drummey

          Hi Ryan,

           

          Try AVG({INCLUDE [unique patient ID field] : SUM([Number of Records])} in a view that doesn't have the unique patient ID in it and filters for DX = Z96.52. The {INCLUDE... is a Level of Detail expression that computes the average number of visits per patient *plus* any dimensions in the level of detail of the viz.

           

          Jonathan