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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
chrisv08
Frequent Visitor

Find Duplicates from one table to another.

I have these 2 tables one for 2020 and one for 20201 with lets say 5 columns.  It has First Name, Last Name, Location #, Unique Identifier, and Amount Charged.

 

We're trying to identify customers that have gone from one location one year to a different the following year. So basically at the top I want to have 2 filters, one for 2020 and one for 2021. I select a location for each year and if there are any duplicates, it shows up on the table the name, unique identifier of these duplicates. The unique identifier never changes, even if they go from one location to another.

 

3 REPLIES 3
Anonymous
Not applicable

Hi @chrisv08 ,

Can you provide sample data and expected output?

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@chrisv08 , With combine these two tables, or create year and location as common dimensions and join with them.

In any case have these two dimensions

 

Have these measures from two tables (or one table), with common Date/year Table

 

This Year = CALCULATE(sum('Table1'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])))
Last Year = CALCULATE(sum('Table2'[Qty]),filter(ALL('Date'),'Date'[Year]=max('Date'[Year])-1))

 

Location Same = countx( Addcolumns(Summarize(Table, Table[Customer], Location[Location]) , "_1", [This Year]

, "_2", [Las year]) , if(not(isblank([_1])) && not(isblank([_2])) , [Customer], blank())

 

subtract from distinct count of location for changed location

 

 

similar approch like

https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I think this only calculates the amount of duplicates,  would thi also show the actual customers that are duplicate. Like first and last name of each duplicate.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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