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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
datagorillagirl
Microsoft Employee
Microsoft Employee

null

null

2 REPLIES 2
amitchandak
Super User
Super User

@datagorillagirl ,

 

A new measure assuming Ending HC is a measure

 

Measure =

var _max = maxx(allselected(Table), Table[Fiscal Month ID])

var _min = Minx(allselected(Table), Table[Fiscal Month ID])-1

return

calculate(Divide(Sumx(Table, [Ending HC]), _max -_min), filter(all(Table[Fiscal Month ID]), Table[Fiscal Month ID] >=_min && Table[Fiscal Month ID] <= _max ) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi! I have a problem that I have been trying to solve for days. I need to calculate working hours by manufacturing line over multiple days. the problem is I have to do this by time of first unit produced-time of last unit produced for each day. I dont know how to go through each day, take the min time and max time, subtract the two, and add to a running total going through everyday that my date slicer has included. If you are able to help that would be awesome!! Let me know 🙂

 

Here is some sample data. This will eventually allow me to calculate an accurate "Units per hour".

 

Line NumberDateTimeUnits
19/20/20228am1
19/20/202210am1
19/20/20221pm1
19/20/20224pm1
19/21/20227am1
19/21/20229am1
19/21/202211am1
19/21/20221pm1
19/22/20226am1
19/22/202210am1
19/22/20222pm1
29/20/20228am1
29/20/202210am1
29/20/20221pm1
29/20/20224pm1
29/21/20227am1
29/21/20229am1
29/21/202211am1
29/21/20221pm1
29/22/20226am1
39/21/202210am1
39/21/20222pm1
39/22/20229am1
39/22/202211am1
39/22/20221pm1

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.