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
Porkey
Frequent Visitor

Joining two tables but if column contains nulls join using another column for that row

I dont think this is possible, but i was wondering if it is, ive looked round but cant find an example of it being or not being possible

 

Merge 1 with 2

 

Table 1

Staff IDDepartment ID
1a
2c
nullb

 

Table 2

Staff IDDepatment IDLocation
1aScotland
2cWales
3bEngland

 

 

Outcome

Staff IDDepartment IDLocation
1aScotland
nullbEngland
2cWales

 

So because department B is in england it picks that up rather than where the staff id is based, I wouldnt want to use department ID as certain staff would not be located in the department location so would prefer to pick it up from Staff ID, but where thats missing from department ID instead

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Porkey ,

Please try to use Right Outer join kind.

vpollymsft_0-1664247351186.png

 

Then remove the columns that you don't need.

vpollymsft_1-1664247466143.png

vpollymsft_2-1664247513672.png

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Porkey ,

Please try to use Right Outer join kind.

vpollymsft_0-1664247351186.png

 

Then remove the columns that you don't need.

vpollymsft_1-1664247466143.png

vpollymsft_2-1664247513672.png

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.