Forum Discussion
Get average minutes late
I have a field that calculates how many hours and minutes late something is.
Schd time - actual time
It is stored in a column formated as H:mm
what I want to do is get an average time in minutes of late cases. So my total late time is 8hours and 38 minutes for 19 cases.
how do I do the calculation to get an average late time of 27 minutes?
I found a solution.
I did TotalLateMinutes = HOUR(patientinfo[TimeToSurgery])*60+MINUTE(patientinfo[TimeToSurgery])
then took that divided by number of late cases.
- Anonymous8 years ago
Hi kattlees,
I think you can also take a look at below blog to know how to calculate with time format:
Regards,
Xiaoxin Sheng
4 Replies
- Ashish_Mathur
Super User
Hi,
May be something like this
=SUM(Data[Late])/CALCULATE(DISTINCTCOUNT(Data[Case id]),Data[Late]>0)
Hope this helps.
- kattlees
Post Patron
Here are the values:
Late Cases = 19
Sum of TimetoSurgery is TotalLateTime = 8:38 hours:minutes
LateTimeMin = sum(patientinfo[TimeToSurgery])/[LateCases] - this gets me .01
AverageLateTime = TotalLateTime/LateCases - this gets me 1.08
I need the final value to be in minutes... this one should be 27minutes 8:38 = 518 minutes / 19 cases = 27.26 minutes
- kattlees
Post Patron
I found a solution.
I did TotalLateMinutes = HOUR(patientinfo[TimeToSurgery])*60+MINUTE(patientinfo[TimeToSurgery])
then took that divided by number of late cases.