Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
So I work in a factory and I have some data that I cannot figure out how to sum up.
Basically, the intent of this is to get "How many minutes did this person work on this machine out of the full 8 hour shift?"
This will allow me to get a ratio of utilization of our machines compared to what we expect.
We expected our employees to get 420 minutes of utilization per shift. (8 hours minus some breaks/lunch/etc)
So I have the dataset of inspections.
Inspections
Inspection Ticket | Start Time | End Time | Shift |
1 | 8/3/2021 6:45 AM | 8/3/2021 6:55 AM | 1st |
2 | 8/3/2021 7:30 AM | 8/3/2021 7:35 AM | 1st |
So on and So Forth.
I also have a datetime column that has this data
Date | Shift | Shift Start Time | Shift End Time | Shift Start Datetime | Shift End Datetime | Max Minutes Available |
8/3/2021 | 1st | 12/30/1899 6:30 AM | 12/30/1899 2:30 PM | 8/3/21 6:30 AM | 8/3/21 2:30 PM | 420 |
8/3/2021 | 2nd | 12/30/1899 2:30 PM | 12/30/1899 10:30 PM | 8/3/21 2:30 PM | 8/3/21 10:30 PM | 420 |
8/3/2021 | 3rd | 12/30/1899 10:30 PM | 12/30/1899 6:30 AM | 8/3/21 10:30 PM | 8/4/21 6:30 AM | 420 |
Here's what I would expect to see.
Minutes of Inspection Time =
Solved! Go to Solution.
Hi @TimothyJames ,
Step 1: Create a relationship between Inspections and datetime with shift column.
Step 2: Create a calculate column to Inspections.
_diff = DATEDIFF(Inspections[Start Time],Inspections[End Time],MINUTE)
Step 3: Create a measure.
Measure = SUM(Inspections[_diff])/SUM(datetime[Max Minutes Available])
Best Regrads,
Jay
Hi @TimothyJames ,
Step 1: Create a relationship between Inspections and datetime with shift column.
Step 2: Create a calculate column to Inspections.
_diff = DATEDIFF(Inspections[Start Time],Inspections[End Time],MINUTE)
Step 3: Create a measure.
Measure = SUM(Inspections[_diff])/SUM(datetime[Max Minutes Available])
Best Regrads,
Jay
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
78 | |
54 | |
39 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |