Forum Discussion

mjholland's avatar
mjholland
Advocate II
9 years ago
Solved

Average Time Between Calls - End Time Versus Start Time

Hi,   I have data for a number of members of staff from the beginning of 2016 to now. Each member of staff visits a different number of customers each day. These customer visits are recorded with t...
  • mjholland's avatar
    mjholland
    9 years ago

    I've figured it out.

     

    I know the total hours worked each day from the first start time and last end time. I also know the total time for each call - the difference between start and end time. So if I total the time in call and subtract it from the total hours worked I get the total time between calls each day. Then all I need to do is divide this by the total number of calls made minus 1.

     

    Here's the DAX solution:

     

    TimeBetweenCalls = ((([TotalHoursWorked]-(sum('TITO Data'[TimeOnCall])/60)))/(count('TITO Data'[EntryDate])-(1*DISTINCTCOUNT('TITO Data'[EntryDate]))))*60

     

    I need to be able to roll this up to an average for the total week so I've added in DISTINCTCOUNT of the EntryDate so the function removes 1 additional call for each day worked.

     

    mjholland