Remove Duplicates Issue

happyhungarian

Active Member
Joined
Jul 19, 2011
Messages
252
Office Version
  1. 365
Platform
  1. Windows
Hi All, I'm running the following power query but the results are leaving a few duplicate "Unique ID"s. Can you tell me where I am going wrong with this? What I was hoping it would do is first filter out any records where the "Total" was not >=0 and then, with the remaining records, filter out any duplicate Unique IDs (even if the duplicate Unique ID had a different "Total". Hope that makes sense.

let
Source = Excel.CurrentWorkbook(){[Name="Prior"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Status", type text}, {"Company", type text}, {"Customer", type text}, {"Total", type number}, {"Unique ID", type text}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Status", "Company", "Customer"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Columns", each [Total] >= 0),
#"Removed Duplicates" = Table.Distinct(#"Filtered Rows", {"Unique ID"})
in
#"Removed Duplicates"
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Are there any spaces that maybe you can't see? Maybe use the Text.Trim function
 
Upvote 0
I did notice that the duplicate records had different capitalization of letters but when I do "Record"="Record" i get a "True" answer. I wouldn't think that Remove Duplicates would take capitalization into account but maybe that's it?
 
Upvote 0
Yes that it is it. use the function Text.Upper or Text.Lower and then remove duplicates
 
Upvote 0
Solution

Forum statistics

Threads
1,215,071
Messages
6,122,964
Members
449,094
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top