Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
Hi @PoweredOut ,
Our production data is as follows.
| Time | Production | Shift Bucket |
| 7:05 | 89% | 06:00 - 14:00 |
| 9:05 | 91% | 06:00 - 14:00 |
| 10:30 | 90% | 06:14:00 |
| 18:19 | 55% | 14:00 - 22:00 |
| 21:05 | 72% | 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.
Not sure how your table is setup, but you could probably add a custom column with these shift time buckets.
| Time | Production | Shift Bucket |
| 7:05 | 89% | 06:00 - 14:00 |
| 18:19 | 55% | 14:00 - 22:00 |
You can then follow this video https://www.youtube.com/watch?v=BY-5waiLp0g
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |