Forum Discussion
Linking Values from one table to another based on Timestamps
I need some help. I have two tables in Power BI. Table 1 has the GPS coordinates for each unit in my vehicle fleet, and Table 2 has the start and end timestamps for the vehicle status of each unit. I want to pull the vehicle status from Table 2 into Table 1 such that:
- if the GPS reading timestamp for a particular vehicle in Table 1 falls within the start and end time for a specific status in Table 2, then it returns that status
With this, I would know the status of each vehicle along its travel route.
Here's a demo file to represent my data tables
See examples of what my tables look like below:
OTL Created a custom column (Status) at power query based on the mentioned logics please check the below output and PBIX file
Did I answer your question ? If yes, please mark this post as a solution.
Thanks,
Jai
6 Replies
- Jai-Rathinavel
Super User
OTL Can you paste the sample tables to work with ? So that I can provide you the exact working DAX
Thanks,
Jai
- OTLFrequent Visitor
Thanks Jai. I have included a link in my original post to a sample dataset
- Jai-Rathinavel
Super User
OTL Requested access to the file