Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kattlees
Post Patron
Post Patron

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?

 

2 ACCEPTED SOLUTIONS

I found a solution.

 

I did TotalLateMinutes = HOUR(patientinfo[TimeToSurgery])*60+MINUTE(patientinfo[TimeToSurgery])

then took that divided by number of late cases.

View solution in original post

Hi @kattlees,

 

I think you can also take a look at below blog to know how to calculate with time format:

 

Aggregating Duration/Time

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

May be something like this

 

=SUM(Data[Late])/CALCULATE(DISTINCTCOUNT(Data[Case id]),Data[Late]>0)

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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

I found a solution.

 

I did TotalLateMinutes = HOUR(patientinfo[TimeToSurgery])*60+MINUTE(patientinfo[TimeToSurgery])

then took that divided by number of late cases.

Hi @kattlees,

 

I think you can also take a look at below blog to know how to calculate with time format:

 

Aggregating Duration/Time

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.