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

Remove duplicity on same time

Hi, I'm using Power BI Desktop and I need to remove duplicate values but only on same day. For example:

Ex.JPG

 

I need to know only that No. 22011 bought something on 28.12.2016 then on 15.12.2016 something and on 6.11.2016 something. Hope you understand.

 

Thank you for your help.

1 ACCEPTED SOLUTION
tringuyenminh92
Memorable Member
Memorable Member

Hi @gmmb1,

 

You could achieve this by Query Editor like this (assume we have 2 columns Date and Id)

  1. data with 2 columns
  2. duplicated Date column
  3. get date only 
  4. duplicated Id column
  5. Merge 2 new columns
  6. remove duplicates by Merged Column

 

We have 2 columns in datasetWe have 2 columns in datasetduplicated Date columnduplicated Date columnI will select only Date and remove part of time cause you want check there are some orders in that dateI will select only Date and remove part of time cause you want check there are some orders in that date10 first characters10 first charactersduplicated Id columnduplicated Id columnChoose 2 new duplicated columns (Id copy & date copy) to merge columnChoose 2 new duplicated columns (Id copy & date copy) to merge columndefault behaviordefault behaviorthe rest of things is choose Merged column and select Remove Duplicatesthe rest of things is choose Merged column and select Remove Duplicates

 

Note: If you want to check based on DateTime, you dont need to remove time part (just merge datetime and id, then remove dup on merged column)

 

 

If this works for you please accept it as solution and also like to give KUDOS.

Best regards
Tri Nguyen

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @gmmb1,

 

You can simply use DISTINCT function to filter the duplicate records.(it also works on table)

 

Reference:

DISTINCT Function (DAX)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Baskar
Resident Rockstar
Resident Rockstar

hi dude , 

 

cool we can remove the duplicate in multiple ways in power bi. that is not a problem ,

here my question is  u have another one column right from that what u want ?

 Max , Min , Sum ?

tringuyenminh92
Memorable Member
Memorable Member

Hi @gmmb1,

 

You could achieve this by Query Editor like this (assume we have 2 columns Date and Id)

  1. data with 2 columns
  2. duplicated Date column
  3. get date only 
  4. duplicated Id column
  5. Merge 2 new columns
  6. remove duplicates by Merged Column

 

We have 2 columns in datasetWe have 2 columns in datasetduplicated Date columnduplicated Date columnI will select only Date and remove part of time cause you want check there are some orders in that dateI will select only Date and remove part of time cause you want check there are some orders in that date10 first characters10 first charactersduplicated Id columnduplicated Id columnChoose 2 new duplicated columns (Id copy & date copy) to merge columnChoose 2 new duplicated columns (Id copy & date copy) to merge columndefault behaviordefault behaviorthe rest of things is choose Merged column and select Remove Duplicatesthe rest of things is choose Merged column and select Remove Duplicates

 

Note: If you want to check based on DateTime, you dont need to remove time part (just merge datetime and id, then remove dup on merged column)

 

 

If this works for you please accept it as solution and also like to give KUDOS.

Best regards
Tri Nguyen

MrPowerBIPro
Helper II
Helper II

You can change the format of date to "YYYY : MM : DD" and then select the column and Click one the "remove duplicate".

use this function:


DATE(<year>, <month>, <day>):

<year>= Year (yourdate)

<month>= month(yourdate)

<day>= day (yourdate)

 

Please let me know if you have any question!

Enemy of can't
www.mrpowerbi.pro

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.