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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Merge two tables - excluding rows that have the same value in one column

Hi, 

 

I was wondering if there is a way of merging two tables that would provide this result set. 

 

Table A: 

IDActivityCreation Time
11

11:00

2012:00
3013:00
4010:30
5011:00
6012:00

 

 

Table B: 

 

IDActivityCreation Time
23

12:00

729:00
8210:00
9210:30
10210:00
1128:00

 

 

I want to get back everything from Table B, plus everything in Table A EXCLUDING anything that has the same ID as something in Table B, so this is the data I want returned: 

 

IDActivityCreation Time
11

11:00

2312:00
3013:00
4010:30
5011:00
6012:00
729:00
8210:00
9210:30
10210:00
1128:00

 

Any suggestions? I've tried the Merge in Power Query and that doesn't allow a bespoke option. I was wondering if I need to do this as part of a union of the two tables? But cannot work out how to write this. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thank you @Mariusz, your answer helped me work out the correct answer. You need to do this to create a new table, then use a union to join the extra data you are missing in. Thanks

View solution in original post

2 REPLIES 2
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

You need to merge Join Kind   - Left Anti()
image.png

Remove the new column created from Table A

Next Append Both tables 
image.png

 

Please see the attached file for ref.

 

 

Best Regards,
Mariusz

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

Please feel free to connect with me.
LinkedIn

 

Anonymous
Not applicable

Thank you @Mariusz, your answer helped me work out the correct answer. You need to do this to create a new table, then use a union to join the extra data you are missing in. Thanks

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors