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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
nunnc01
Helper II
Helper II

Combining data in Power query

Hi,

 

I have a table in Power Query that has a Unique ID and a month end date. Each ID can have multiple rows, each with a different month end date similar to this:

 

Unique ID    Month End

ID 1            31/01/2021

ID 1            28/02/2021

ID 1            31/03/2021

ID 2            31/01/2021

ID 2            28/02/2021

 

What I want to do is pull in an additonal column of information from another table that I have which is structured like this where the ID matches and the Month End Date falls between the Start Date and End Date.

 

Unique ID      Start Date          End Date              Column I want to show in my original table

ID 1               07/01/2021        14/02/2021           Text

ID 1               14/02/2021        16/03/2021           Text

ID 2               11/12/2020        null                        Text

 

Please can someone advise how this can be done in Power Query please?

 

Thanks

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @nunnc01 

 

Download sample PBIX

 

I'd create a new column in Table2 with the month end date for the month in Start Date. 

monthend.png

You can then merge the tables on the ID and Month End Columns

merge.png

Giving this

merged.png

Regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @nunnc01 

 

Download sample PBIX

 

I'd create a new column in Table2 with the month end date for the month in Start Date. 

monthend.png

You can then merge the tables on the ID and Month End Columns

merge.png

Giving this

merged.png

Regards

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.