cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
blynn Frequent Visitor
Frequent Visitor

Calculating downtime for shifts when downtime crosses shifts

We have 4 crews(A,B,C,D), that work rotating 12 hr shifts and they are 6:00 to 18:00 and 18:00 to 6:00. We capture downtime in a table with a starttime and an endtime. We have a slicer that sets a start date of say 4/29 6:00 and end date of 5/6 6:00. We have a table with the shift schedule, where there are 2 rows for each day, like 04/29/18 6:00 and 4/29/18 18:00 with the shift letter.

 

Each shift's downtime is the time down in their shift, while the total downtime for that segment could span mutliple shifts and be outside the slicer limits. I'm looking for a way to get a breakdown of each shifts downtime and sum that downtime up for a total. I'm using Directquery now, but if its impossible I can switch to import. I wasn't sure how to start to set the relationships and what measures to create. I had something working between the slicers with IF statements but I had to switch to Import before it would work. However, this didn't address breaking it down by shifts. I'm more of a SQL person than a DAX person so it something needs to be prepared on the SQL side, I can do that.

 

I can capture screen shots of the data is thats helpful.

 

Any help would be appreciated!

Bart

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
blynn Frequent Visitor
Frequent Visitor

Re: Calculating downtime for shifts when downtime crosses shifts

I spent some time and I ended up  figuring it out on my own.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Calculating downtime for shifts when downtime crosses shifts

HI @blynn,

 

Please provide some sample data or pbix file to help us clarify your scenario and coding formula.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI
blynn Frequent Visitor
Frequent Visitor

Re: Calculating downtime for shifts when downtime crosses shifts

I spent some time and I ended up  figuring it out on my own.

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors