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
Anonymous
Not applicable

Mean Time To Repair

Hi Guys

 

I want to work out the Mean Time To Repair for our Helpdesk

 

I have the TicketLoggedDate and the TicketClosedDate (both values with date/time)

 

I have managed to use DATEDIFF to get the time difference which is fine, but I am struggeling to add a formula that will only take in consideration working hours from 8AM to 5PM

MeanTimeToRepair = DATEDIFF(JOB_TICKET[TicketLoggedDate],JOB_TICKET[LAST_UPDATED],DAY)

If someone can help me with a formula that would be AMAZING!

 

Thank you in advance 

 

2 REPLIES 2
TeigeGao
Solution Sage
Solution Sage

Hi MorneLandsberg,

According to your description, my understanding is that you want to calculate the net working hours. PowerBI doesn't provide a function to do it directly, as a workaround, we can write the expression manually, please refer to this case: https://community.powerbi.com/t5/Desktop/Calculating-Working-hours/td-p/374255

Best Regards,

Teige

Anonymous
Not applicable

Thank you @TeigeGao 

I am trying that formula and coding but as others on that page I am also getting the "The start date in Calendar function can not be later than the end date"


I have checked that my TicketLoggedDate and TicketClosedDate is set to "Date/Time" and the correct Format as well
MTTRcode.png

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.