Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Yannick63
Frequent Visitor

Merge two table base on date

Hello

I'm loking for help to join in Power Query 2 tables

 

First table "BNS" containing material 

Material   begining_date              end_date

A1            10/09/2019 12:04:32    10/09/2019 13:00:25

A2            10/09/2019 13:00:25    10/09/2019 14:05:35

B1             10/09/2019 12:30:25    10/09/2019 14:00:26

B2             10/09/2019 14:00:26    10/09/2019 14:35:23

 

Second table "CAB" containing final product 

Id               begining_date              end_date

12            10/09/2019 12:32:35    10/09/2019 12:36:25

13            10/09/2019 12:40:25    10/09/2019 12:45:35

 

I need to have a final table  

Material   begining_date              end_date                        Id

A1            10/09/2019 12:04:32    10/09/2019 13:00:25     12

A1            10/09/2019 12:04:32    10/09/2019 13:00:25     13

A2            10/09/2019 13:00:25    10/09/2019 14:05:35

B1             10/09/2019 12:30:25    10/09/2019 14:00:26    12

B1             10/09/2019 12:30:25    10/09/2019 14:00:26    13

B2             10/09/2019 14:00:26    10/09/2019 14:35:23

 

I hope it's clear.

My 2 tables contains a lot of information so the most efficient solution will be appreciated 🙂

thank's in advance for you help

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Yannick63 

 

Please see the attached file with the solution.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

 

View solution in original post

4 REPLIES 4
Mariusz
Community Champion
Community Champion

Hi @Yannick63 

 

Please see the attached file with the solution.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

 

So many thanks @Mariusz  it seems to work perfectly

 

Anonymous
Not applicable

hi @Mariusz ,

 

Thanks for sharing your PBIX file. finally output showing correctly, But is there any other way to solve this Problem.

 

regards,

Naveen

Hi @Anonymous 

 

What is the logic in this scenerio, will it always happen on the same day?

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.