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
MatNyr
Frequent Visitor

Resetting your average at shift change in production

Hi All,

 

We are currently getting data each minute of our production speed. We would like to see the average of the current shift till. Can someone write a DAX code or power query code to have following (see example below):

 

So we have 3 shifts (06:00 - 14:00, 14:00 - 22:00, 22:00 - 06:00)

 

So let's say it is 11:15, then the average production speed of 06:00 till 11:15 should be shown in the report. At 14:01, the average should be reset to 0 and the average should be taken from 14:00 till 14:01. At 17:45, the average production speed of 14:00 till 17:45 should be taken. Again at 22:00, the average should be reset to 0. Again and again.

 

Thanks for the help!

2 REPLIES 2
MatNyr
Frequent Visitor

Hi @PoweredOut ,

 

Our production data is as follows.

TimeProductionShift Bucket
7:0589%06:00 - 14:00
9:0591%06:00 - 14:00
10:3090%06:14:00
18:1955%14:00 - 22:00
21:0572%14:00 - 22:00

 

The result I would like to have is to get live average depending on the hour. But that it resets the average once it passes to a next shift.

PoweredOut
Resolver I
Resolver I

Not sure how your table is setup, but you could probably add a custom column with these shift time buckets. 

TimeProductionShift Bucket
7:0589%06:00 - 14:00
18:1955%14:00 - 22:00

 

You can then follow this video  https://www.youtube.com/watch?v=BY-5waiLp0g 

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.