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

How to remove duplicates for each datetime in Power Query

In the image below you see my table which contains duplicate values for each hour and each day. 

 

I would like to remove the duplicates for each datetime.

 

Niels_IRD_0-1668521906309.png

 

another example below:

 

01/01/2022 1:00:00Y
01/01/2022 1:00:00Y
01/01/2022 1:00:00Z
01/01/2022 2:00:00X
01/01/2022 2:00:00X
01/01/2022 2:00:00Y

 

Expected output:

 

01/01/2022 1:00:00Y
01/01/2022 1:00:00Z
01/01/2022 2:00:00X
01/01/2022 2:00:00Y

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1668522525526.png

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

4 REPLIES 4
serpiva64
Super User
Super User

Hi,

first insert a merge column

serpiva64_0-1668522660737.png

then remove duplicates in your merged column

serpiva64_1-1668522715341.png

then remove merged column

 

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

JorgePinho
Solution Sage
Solution Sage

Hello @Niels_IRD !

You can remove duplicates based on 2 columns.

Animation.gif

JorgePinho
Solution Sage
Solution Sage

Hello @Niels_IRD !

You can remove duplicates based on 2 columns.

Animation.gif

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1668522525526.png

 

 

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
Vote for T-Shirt Design

Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

March 2023 Update3

Power BI March 2023 Update

Find out more about the March 2023 update.

March Events 2023A

March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors