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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

remove duplicates from one column that are also in a column in a different table

They say there are no silly questions, but I'm sure this probably is.

 

I have 2 tables.

One has a column with unique numbers in it. I also have the same column in Table 2, with possibly matching data.

Table 1                                           Table 2

Column1                                        Column1

1111111                                         1111113 

1111112                                         1111115   

1111113                                         etc etc 

1111114

1111115

etc etc

 

 

What I'd like to do is be able to remove or filter out from Table1 Column1 any items that are in Table2 Column1 without having to create a new column.

 

Possible? 

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

You want to remove some values without adding a new column. Maybe you can do it in the Query Editor.

1. Open Query Editor, merge two tables with "Left Outer Join".

2. Expand the table. (click the sign in the blue rectangle)remove duplicates from one column that are also in a column in a different table3.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3. Filter the new column, keep nulls only.

4. Remove the new column.

 

remove duplicates from one column that are also in a column in a different table4.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
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

4 REPLIES 4
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

You don't want to create a new column, you can try to create a visualization Table. 

1. Create a relationship.

 

remove duplicates from one column that are also in a column in a different table.JPG

 

 

 

 

 

 

 

 

 

 

 

2. Create a visualization: Table and fitler Table2[Column1] as "is not blank".remove duplicates from one column that are also in a column in a different table2.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3. You can export the data if you want.

 

Best Regards!

Dale

 

 

 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Unfortuantely this doesnt provide me with what I need. Dont think I was very clear if I'm honest.

 

Table1-Column1 holds 5000 different numbers.

1111111

1111112

1111113

1111114

1111115

etc etc

 

Table2-Column1 holds only a few items, but they are also in Table1-Column1

1111112

1111115

 

I have created a relationship between the two.

I use the data in Table1-Column1 in various visualisations, but this data is not entirely correct because the duplications have not been removed.

 

How do I connect the 2 table columns to allow for the removal of duplicates without having to create a new column.

Hi @Anonymous,

 

You want to remove some values without adding a new column. Maybe you can do it in the Query Editor.

1. Open Query Editor, merge two tables with "Left Outer Join".

2. Expand the table. (click the sign in the blue rectangle)remove duplicates from one column that are also in a column in a different table3.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3. Filter the new column, keep nulls only.

4. Remove the new column.

 

remove duplicates from one column that are also in a column in a different table4.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mattbrice
Solution Sage
Solution Sage

Look at EXCEPT function:

 

EXCEPT ( VALUES( Table1[Col1] ) , VALUES ( Table2[Col1] )  ) 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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