Forum Discussion

robandemmy's avatar
robandemmy
Frequent Visitor
4 years ago

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's avatar
    Samarth_18
    Icon for Community Champion rankCommunity 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

    • robandemmy's avatar
      robandemmy
      Frequent Visitor
      MachineStart TimeEnd TimeBarcode Production Time (minutes) 
      M0422-11-21 17:1223-11-21 01:0650002148 474<---Custom Column  =(End time-Start time)*1440
      M0407-08-21 13:4307-08-21 21:2350002153 460 
      M0408-08-21 08:5608-08-21 16:1150002159 435 
      M0408-08-21 17:5309-08-21 01:1050002161 437 
      M0411-08-21 17:2312-08-21 00:2950002182 426 
      M0417-08-21 00:5317-08-21 08:0050002219 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