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

 

 



Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Learn Power BI P&L Statement || Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s ||
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!!! How to get Quick Help !!
Resources | Master Power BI !! Expertise Power BI !! Power BI For Tableau User !!

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

 

 



Features || Datamarts: https://youtu.be/8tskWsJTEpg || Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Learn Power BI P&L Statement || Time Intelligence Decoded : https://youtu.be/aU2aKbnHuWs&t=145s ||
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!
Dashboard of My Blogs !! Connect on Linkedin !! Subscribe to my youtube Channel !!!! How to get Quick Help !!
Resources | Master Power BI !! Expertise Power BI !! Power BI For Tableau User !!

Helpful resources

Announcements
Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.