Forum Discussion
robandemmy
4 years agoFrequent Visitor
Production Across Shifts
I am trying to build a somewhat simple report to display production by shift and by day. My problem is that the unit production time often crosses over shifts. We currently have morning and evening shifts of 12 hours (6am-6pm and 6pm to 6am). I have a table with a start time stamp and an end time stamp. Say a unit is started at 4pm and finished at 9pm, how can I get 0.40 units assigned to M shift and 0.60 units assigned to E shift?
I could probably get this to work in Excel but am fairly new to Power BI and DAX.
2 Replies
- Samarth_18
Community Champion
Hi robandemmy ,
It would be helpful to answer if you could provide some sample data in text format(not a screenshot) and expected output.
Thanks,
Samarth
- robandemmyFrequent Visitor
Machine Start Time End Time Barcode Production Time (minutes) M04 22-11-21 17:12 23-11-21 01:06 50002148 474 <---Custom Column =(End time-Start time)*1440 M04 07-08-21 13:43 07-08-21 21:23 50002153 460 M04 08-08-21 08:56 08-08-21 16:11 50002159 435 M04 08-08-21 17:53 09-08-21 01:10 50002161 437 M04 11-08-21 17:23 12-08-21 00:29 50002182 426 M04 17-08-21 00:53 17-08-21 08:00 50002219 427 I would like to report out that 48 minutes of that unit (48/474=0.101 units) was produced on day shift, while the remainder (426/474=0.899 units) was produced on night shift