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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Mathew_LeRoy
New Member

Need help with repairs per hour

I have an issue with a report. I am looking to see the repairs per hour. The sample data set I am working with is below. I want to see the repairs per hour by owner but I can't seem to figure it out. I haven't had any real training Power BI and I am learning as i go. Please help me out.

 

Work OrderSerial numberCreated onCompleted OnOwner
WO54318A14/11/24 1:17 PM4/11/24 1:24 PMScott Peterson
WO54319A24/11/24 1:54 PM4/11/24 2:08 PMScott Peterson
WO54320A34/11/20242 2:15 PM4/11/20242 2:22 PMScott Peterson
WO54321A44/11/24 2:24 PM4/11/24 2:31 PMMark Dobson
WO54322A54/11/24 2:38 PM4/11/24 2:59 PMScott Peterson
WO54323A64/11/24 3:17 PM4/11/24 3:21 PMMark Dobson
WO54324A74/11/24 3:22 PM4/11/24 3:32 PMMark Dobson
WO54325A84/11/24 3:36 PM4/11/24 3:42 PMMark Dobson
WO54326A94/11/24 3:44 PM4/11/24 3:49 PMScott Peterson
WO54327A104/11/24 3:50 PM4/11/24 3:57 PMMark Dobson
WO54328A114/11/24 3:58 PM4/11/24 4:01 PMScott Peterson
WO54329A124/11/24 4:05 PM4/11/24 4:12 PMScott Peterson
WO54330A134/11/24 4:14 PM4/11/24 4:20 PMScott Peterson
WO54331A144/11/24 4:21 PM4/11/24 4:30 PMTyler Richardson
WO54332A154/11/24 4:32 PM4/11/24 4:47 PMTyler Richardson
WO54333A164/11/24 4:51 PM4/11/24 4:59 PMTyler Richardson
1 ACCEPTED SOLUTION
quantumudit
Super User
Super User

It would be great if you could provide more clarity on the logic for calculating a repair.

As of now, I have taken the following assumption:
Repair duration = Time difference in minutes between "Created On" and "Completed On"

 

Thus, I created a calculated column in the table as follows, that calculates the repair duration in Minutes:

Duration = DATEDIFF(Repairs[Created on],Repairs[Completed On],MINUTE)

I have then used the "Duration" measure to calculate number of repairs in a minute and then on a hour. Here is the measure:

Repairs per Hour = 
VAR _repairPerMinute = DIVIDE(COUNT(Repairs[Work Order]),SUM(Repairs[Duration]))
VAR _repairPerHour = _repairPerMinute * 60
RETURN
ROUND(_repairPerHour, 0)

If my assumption is correct then you can use this measure and it should solve your problem. Here is screenshot of the result:

quantumudit_0-1712906264269.png

 

In case, this is not something that you expect, kindly provide the following details:
- A logic for the repair duration calculation
- A sample anonymized dataset
- A sample image/data of the expected answer

 

Best Regards,
Udit

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
Visit My Linktree: LinkTree

View solution in original post

4 REPLIES 4
quantumudit
Super User
Super User

It would be great if you could provide more clarity on the logic for calculating a repair.

As of now, I have taken the following assumption:
Repair duration = Time difference in minutes between "Created On" and "Completed On"

 

Thus, I created a calculated column in the table as follows, that calculates the repair duration in Minutes:

Duration = DATEDIFF(Repairs[Created on],Repairs[Completed On],MINUTE)

I have then used the "Duration" measure to calculate number of repairs in a minute and then on a hour. Here is the measure:

Repairs per Hour = 
VAR _repairPerMinute = DIVIDE(COUNT(Repairs[Work Order]),SUM(Repairs[Duration]))
VAR _repairPerHour = _repairPerMinute * 60
RETURN
ROUND(_repairPerHour, 0)

If my assumption is correct then you can use this measure and it should solve your problem. Here is screenshot of the result:

quantumudit_0-1712906264269.png

 

In case, this is not something that you expect, kindly provide the following details:
- A logic for the repair duration calculation
- A sample anonymized dataset
- A sample image/data of the expected answer

 

Best Regards,
Udit

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
Visit My Linktree: LinkTree

I am looking to be able to calculate repairs per hour by owner. I dont have any other time metrics to use other than created on and completed on. I am going to run the logic built and update after. I am sorry I can't give more.

No problem,

Just try the solution and let me know if it solves your issues.

Happy to help 😊

 

Best Regards,
Udit

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudo 👍

🚀 Let's Connect: LinkedIn || YouTube || Medium || GitHub
Visit My Linktree: LinkTree

 

This works! Thank you for the help!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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