If you can treat the situation as one day at a time, parse this into a table of Person, timeblock, taken/not taken, make it distinct, and then count the rows that are taken? Essentially you'd be unpivoting the start and end times, with whichever block size you needed to count? If you need to count by the minute across a year that's not very efficient, but it could be done without processing logic.
------------------------------
Elena Schott
Sr. Business Analyst
Aon - San Francisco, CA
------------------------------
Original Message:
Sent: Aug 08, 2022 07:45 AM
From: Sam Duval
Subject: Looking for DAX help totaling time of overlapping events.
Do you have power automate at your disposal? I keep trying to think of a way to do it in power query and/or BI but keep coming back to SQL based solutions.
Anyways if you have power automate, there is an action item that can run a query against a power bi dataset, so you can use power bi to import the log files, power automate to port the data over to SQL and then reimport the cleansed data back to power bi. This is also dependent on the number of rows and columns you have in the dataset. There's a limit that's based on the ratio of columns x rows.
@Elyse Smith
------------------------------
Sam Duval
Data Quality Analyst
Element Financial
Indianapolis IN
Original Message:
Sent: Aug 05, 2022 05:16 PM
From: Steve Bolton
Subject: Looking for DAX help totaling time of overlapping events.
Elyse, I have not figured it out yet. I have an idea for doing this in Power Query and may have time this weekend to test that out. I'll post results here once I've tried it.
------------------------------
Steve Bolton
Sr. Business Analyst
Original Message:
Sent: Aug 05, 2022 04:41 PM
From: Elyse Smith
Subject: Looking for DAX help totaling time of overlapping events.
Where you able to figure out how to do this? I'm having the same problem and struggling to solve.
------------------------------
Elyse Smith
85283
Original Message:
Sent: Jul 11, 2022 03:01 PM
From: Steve Bolton
Subject: Looking for DAX help totaling time of overlapping events.
Hello,
I have a problem I'm trying to solve with a DAX measure but have not been able to come up with a formula that will work. I have parent events that have a varied number of child events. I'm trying to accumulate duration of these child events grouped by parent but need to exclude overlapping time.
Example of data for a single parent would look like this. The Non-Overlapping column does not exist. I'm looking for how I can calculate the total of non-overlapping time for a parent. It does not matter which of the children the overlap is cut out of.
ParentID
|
ChildID
|
Start
|
End
|
Record Duration
|
Non-overlapping
|
150
|
1
|
0
|
20
|
20
|
20
|
150
|
2
|
5
|
10
|
5
|
0
|
150
|
3
|
10
|
25
|
15
|
5
|
150
|
4
|
30
|
60
|
30
|
30
|
150
|
5
|
35
|
40
|
5
|
0
|
150
|
6
|
45
|
55
|
10
|
0
|
|
|
|
Total
|
85
|
55
|
Graphically the children for this parent would look like this:
I can get the duration of each individual event by End – Start. However how would I go about getting the Non-Overlapping time that should total 55 time units? I'm looking for the duration of the red line above.
------------------------------
Steve Bolton
Sr. Business Analyst
------------------------------