cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bahhoussi
New Member

Identify duplicates

Hello everybody,

 

I want to create in Power BI desktop a new column which will compare 2 other columns.

The purpose is to identify duplicates between these 2 columns.

In Excel, my formula will look like this:

If Column 1 = Column 2 Then "YES"

Else "NO"

but I don't know how to do that in Power BI.

 

Thx a lot for your help.

 

Samir.

1 ACCEPTED SOLUTION
konstantinos
Memorable Member
Memorable Member

Simple than excel , in the same table create "new column"  from the ribbon of PowerBI Desktop or right click the field name on the right pane , and the formula is  

 

1.png

 

IsDuplicate =        Column1 = Column2     This will return FALSE & TRUE...When returns true that means that is duplicated.

 

Now if you need to add it as slicer or filter( True & False is not that good visible ) then

 

IsDuplicate  =IF (  Column1 = Column2  ; " Yes"; "No") 

 

Konstantinos Ioannou

View solution in original post

4 REPLIES 4
konstantinos
Memorable Member
Memorable Member

Simple than excel , in the same table create "new column"  from the ribbon of PowerBI Desktop or right click the field name on the right pane , and the formula is  

 

1.png

 

IsDuplicate =        Column1 = Column2     This will return FALSE & TRUE...When returns true that means that is duplicated.

 

Now if you need to add it as slicer or filter( True & False is not that good visible ) then

 

IsDuplicate  =IF (  Column1 = Column2  ; " Yes"; "No") 

 

Konstantinos Ioannou

@konstantinos

 

Thank you for the tip! Is there a way to identify duplicates within one column?

 

I have a column 'Full Name'. I want to see if there is the same name two or more times

I have a column 'Emails'. I want to make sure that all emails are unique.

 

I don't want to delete duplicates. I want to see them for checking my CRM and correct mistakes.

Create a measure Rows count = COUNTROWS(Your Table name)

Then create one table visual and add the Full name field & Rows count measure. Sort by Row count measure and you will see how many times a name appear in the column.

Do the same for email address
Konstantinos Ioannou

@konstantinos

 

Wow. It is so easy and smart.

 

Thank you so much! 🙂

Helpful resources

Announcements
May 23 2022 epsiode 5 without aka link.jpg

The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

charticulator_carousel_with_text (1).png

Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through June10th!

Power BI Dev Camp Session 22 without aka link and time 768x460.jpg

Check it Out!

Watch Session 22 Ted's Dev Camp along with past sessions!

Power BI Release May 2022 768x460.png

Check it out!

Click here to read more about the May 2022 updates!

Top Kudoed Authors