Forum Discussion

ThomasWeppler's avatar
ThomasWeppler
Impactful Individual
2 years ago
Solved

How to remove the rigth dublicate values?

Hi Power Bi community

I have a table with many forms where questions can be answered.

It haves a colum called object_id (can be multiples but I only want one)

It also has a colum called accepted (which can be true or false)

And there are also other less important colums for this task.

I only want one row for each diffrent object_id. So remove duplicate should work, but if one or more of the row has the value true() in the accepted column then I want that one to be included.
I tried to sort the accepted colums first by true or false but it didn't seem to solve the issue.
Any ideas of what I could try next? All help is greatly appricacted.

  • Hi ThomasWeppler, you have few options:

     

    1. filter out false values before removing duplicates
    2. use Table.Buffer function after sorting and then remove duplicates
    3. remove duplicates using Group By button

3 Replies

  • dufoq3's avatar
    dufoq3
    Community Champion

    Hi ThomasWeppler, you have few options:

     

    1. filter out false values before removing duplicates
    2. use Table.Buffer function after sorting and then remove duplicates
    3. remove duplicates using Group By button
    • ThomasWeppler's avatar
      ThomasWeppler
      Impactful Individual

      Hi dufoq3 

      Thanks for the answer.
      I when with the group by function. I changed "yes" to 1 and "no" 0 I summed it up and this way I could see if yes was selected in one of the object_id thenit would be a number larger than 0. From there it was pretty easy.

      Thanks for the help and getting me in the right direction. 🙂


      • dufoq3's avatar
        dufoq3
        Community Champion

        Glad to help. You're welcome.