Forum Discussion

The_Clam's avatar
The_Clam
Helper I
2 years ago
Solved

Populate a column when datetime from one table is within 15 minutes of datetime on another table.

Hello All!

Please help!

I need to populate an ID1 column in Table1 from ID2 in Table2 WHEN Name1 from Table1 = Name2 from Table2 AND DateTime1 from Table1 is within 15 minutes of DateTime2 in Table2. Link of Power BI file below with datasets and what the result should look like. Thanks!

https://drive.google.com/file/d/107aN9Ogppupe68uSmgXSBcHR1P6AMz9C/view?usp=sharing

 

 

 

 

4 Replies

  • Hey The_Clam ,

     

    I'm wondering if the 2nd condition "within 15 minutes" means, that the timerange of T2/N2 can span 
    T1/N1/D1 -15min and T1/N1/D1 +15min
    What happens if there are more than one ID2 l, e.g. when there is T2/ID2/D2-10 and T2/ID2/D2+11 ?

     

    Next, please share the xlsx files as well, this is required to solve your requirement using Power Query.


    Regards,

    Tom

  • TomMartens , yes +/- 15 for the 2nd condition. Also, if there is more than one ID2 within +/- 15, then no problem, as long as it populates at least one. The data is provided in the Power BI link. Please help! Thanks!