cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
deboec
Frequent Visitor

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")

 

 

deboec
Frequent Visitor

@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

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

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

Top Solution Authors
Top Kudoed Authors