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
ebersolorzano
New Member

Remove duplicated by date

Hello. I need to remove duplicates "name" by date.

In the first case (Yuri Lorena), I need to keep just a row for 2022 -mayo-12.

In the second case (Yulman...), I need to keep the rows 2022-mayo-12 and 2022-noviembre-25

Thanks in advance

ebersolorzano_0-1684534270490.png

 

1 ACCEPTED SOLUTION
collinsg
Super User
Super User

Good day ebersolorzano. The function you need is available from Power Query's UI, via the "Remove Rows" button. Select the columns which are to be considered for duplication. Click "Remove Rows" and from the sub-menu which pops up click "Remove Duplicates". 

 

The Power Query documentation on removing duplicates is here and the "BI Gorilla" has a complete guide here.

 

I reproduced your data, brought it into Power Query...

collinsg_0-1684653368557.png

and then applied the solution to give...

collinsg_1-1684653466425.png

The M code is...

= Table.Distinct(#"Name of Previous Step", {"Name", "Year", "Month", "Day"})

 ...the columns being considered in the duplication are listed between the curly brackets.

View solution in original post

4 REPLIES 4
collinsg
Super User
Super User

Good day ebersolorzano. The function you need is available from Power Query's UI, via the "Remove Rows" button. Select the columns which are to be considered for duplication. Click "Remove Rows" and from the sub-menu which pops up click "Remove Duplicates". 

 

The Power Query documentation on removing duplicates is here and the "BI Gorilla" has a complete guide here.

 

I reproduced your data, brought it into Power Query...

collinsg_0-1684653368557.png

and then applied the solution to give...

collinsg_1-1684653466425.png

The M code is...

= Table.Distinct(#"Name of Previous Step", {"Name", "Year", "Month", "Day"})

 ...the columns being considered in the duplication are listed between the curly brackets.

Thanks a lot. It works.

Mahesh0016
Super User
Super User

@ebersolorzano Please Share your End Output for more understanding.THANK YOU!!

 

Thanks. The issue was solved. 

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.

Top Solution Authors
Top Kudoed Authors