Forum Discussion

BI-1294's avatar
BI-1294
Frequent Visitor
4 years ago
Solved

Remove duplicates doesn't work

Hi all,

I'm facing a very common problem regarding the remove duplicates function in power query. If I try to remove duplicates from the column "username", not all the duplicates are removed (Link for the csv file - open in with Firefox)

I've tried using trim, clean, remove blanks, remove errors transformations before doing the eliminate duplicates, but it doesn't work.

 

Is there anyone you can help me?

In this moment I fixed the problem via dax, but I would prefer to do it in power query and not in dax.

 

Thanks a lot for your help

  • Looking at your data, these rows aren't duplicates since Power Query is case-sensitive.

     

    If you want these to be considered the same, I'd recommend adding a step to transform to all lowercase before removing duplicates.

8 Replies

  • Can you share the M code you are using (you can grab it from the Advanced Editor)?

    • BI-1294's avatar
      BI-1294
      Frequent Visitor

      Yes, of course. Here below the M code.

      An example of user that this code can't remove is "Jvn_91" and I couldn't figure it out why.

       

       

      • AlexisOlson's avatar
        AlexisOlson
        Super User

        Hmm. That's pretty odd. Any chance you can share the CSV or an edited version of it so we can try to reproduce your result?

         

        On the off-chance this is just a caching thing, I recommend hitting Refresh Preview again.