2 Replies Latest reply on Aug 25, 2016 4:56 PM by Yuriy Fal

    Need to include 0(s) in average calculation

    Chris Houchens


      I'm building a dashboard to track consultant utilization across various metrics.  Consultants enter hours into a tracking system from which I'm pulling data (mySQL db).  The issue I'm running into is this:  I'm trying to calculate the avg utilization on a particular day across a group of consultants, but only the values entered are being used in the calculation.  If a consultant does not have data entered for a particular date, a "0" is not being throw in to pull down the average.  I understand why this is happening...but I need it not to happen.


      For example, consider the data set below.


      User A:

      8/1/16 - 8hrs

      8/2/16 - 8hrs

      8/3/16 - 8hrs

      8/4/16 - 8hrs

      8/5/16 - 8hrs


      User B:

      8/2/16 - 8hrs

      8/3/16 - 8hrs


      My report would display 100% utilization for all 5 days, but in actuality 8/1, 8/4 and 8/5 only had 50% utilization - 0hrs should be included for the averages on these days to account for User B not entering any data.  I'm not sure if this is a SQL query fix or a Tableau fix...


      Any assistance would be greatly appreciated!