cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gmiro
Regular Visitor

Connecting time slots with time stamp data

Hi!
I'm new to the forum, and I'd like to get any help regarding this issue. I have two datasets connected by time. One of them is a time slot with a status for each of them:

 

Category
EventInitial timeEnd timeDuration
ConditionA11/11/2020 00:00:0011/11/2020 01:49:2101:49:21
ConditionB11/11/2020 01:49:2111/11/2020 01:51:2900:02:08
ConditionA11/11/2020 01:51:2911/11/2020 02:14:4100:23:12
ConditionB11/11/2020 02:14:4111/11/2020 02:14:5600:00:15

 

The second table is a timestamp typical table for time-based data:

DateData AData B
11/11/2020 0:00:002535
11/11/2020 0:10:004520
11/11/2020 0:20:002025
11/11/2020 0:30:003230
11/11/2020 0:40:001245
11/11/2020 0:50:0045210
11/11/2020 1:00:0050220
11/11/2020 1:10:00241235

 

How I can connect each row of the second table with the appropriate data from the 1st table?

Any help would be appreciated. Thanks!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@gmiro , You can get data from first table into second table like

 

maxx(filter(first, second[Date]>= first[Initial time] && second[Date]<= first[End time]), first[Duration])

 

also refer the way to get data from one table to another - https://www.youtube.com/watch?v=czNHt7UXIe8

 

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@gmiro , You can get data from first table into second table like

 

maxx(filter(first, second[Date]>= first[Initial time] && second[Date]<= first[End time]), first[Duration])

 

also refer the way to get data from one table to another - https://www.youtube.com/watch?v=czNHt7UXIe8

 

 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors