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 Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors