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

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

Reply
Anonymous
Not applicable

Adding column from another table

Hi

 

I have two tables 1st table has a date and time column I would like to add two columns from the 2nd table based on the date/time column in the 1st table. I can only make a relatonship many to many using the month name in both table. 

 

I want to add the DateFrom and DateTo columns from Table 2 to Table 1. If Table 1 Date/Time 12/01/2019 is between Table 2 25/12/2018 and 24/01/2019 then add those two columns to Table 1.

 

I can't use merge in Query Editor as it will create doubles and my DAX knowledge is limited

 

Hope you can help

 

Thanks

 

Table 1

Date/Time             Year             Month

12/01/2019           2019            January

26/02/2019           2019            February

 

 

Table2

 

DateFrom                 DateTo               Year      Month

25/12/2018              24/01/2019        2019     January

25/01/2019              24/02/2019        2019     February

 

This is how Table1 should look like after adding columns from Table 2

 

Table 1

Date/Time             Year             Month            DateFrom          Dateto

12/01/2019           2019            January            25/12/2018       24/01/2019 

22/02/2019           2019            February          25/01/2019       24/02/2019

1 ACCEPTED SOLUTION
AnthonyTilley
Solution Sage
Solution Sage

Is this because you are joining on onyl one colunm months and there are several years so it is not unique 

 

if so then just create some new colunms on each of the table that combine your year and month colunms into one 

 

Colunm = concat(year,month)

 

add this to both tables and then create your join on this colunm and you should get your one to many relation ship and beable to look up based on this value.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
AnthonyTilley
Solution Sage
Solution Sage

Is this because you are joining on onyl one colunm months and there are several years so it is not unique 

 

if so then just create some new colunms on each of the table that combine your year and month colunms into one 

 

Colunm = concat(year,month)

 

add this to both tables and then create your join on this colunm and you should get your one to many relation ship and beable to look up based on this value.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi Anthony

 

the very thing!

 

Cheers

Joe


@AnthonyTilley wrote:

Is this because you are joining on onyl one colunm months and there are several years so it is not unique 

 

if so then just create some new colunms on each of the table that combine your year and month colunms into one 

 

Colunm = concat(year,month)

 

add this to both tables and then create your join on this colunm and you should get your one to many relation ship and beable to look up based on this value.

 

 


 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.