cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deboec
Helper I
Helper I

Append 2 tables and remove dublicate rows

Hello guys,

 

I have two queries in my Excel file via connection.

Both queries are connected to tables with an identical structure (columns).

Only some of the rows are different.

 

I want to append query 1 with query 2 and only keep the rows which are unique. 
(So not only removce duplicates but also remove all rows that are not unique).

Query 1 and query 2 both have an index column.

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @deboec ,

 

Try this:

 

1. Append the two tables.

2. Group the appended table based on your requirements and add a "count" column to count rows at the same time.

3. Only keep the rows which "count"=1.

4. Expand the table.

 

 

Best Regards,

Icey

 

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

3 REPLIES 3
Icey
Community Support
Community Support

Hi @deboec ,

 

Try this:

 

1. Append the two tables.

2. Group the appended table based on your requirements and add a "count" column to count rows at the same time.

3. Only keep the rows which "count"=1.

4. Expand the table.

 

 

Best Regards,

Icey

 

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

CNENFRNL
Super User III
Super User III

@deboec , you might want to create a blank query

 

= Table.Distinct(#"query 1" & #"query 2")

 

 

@CNENFRNL 
If I use this sintax the blank query basically only appends the two queries.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Kudoed Authors