Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Remove duplicates from multiple columns BUT keep the blank and null values.

I have a 3 columns of serial numbers, IMEI numbers and phone numbers. I want to remove the duplicates from each column BUT keep the BLANK and NULL cells. Is there a measure to remove the duplicates in all 3 columns BUT keep the NULL and BLANK rows and how do I implement this measure ? The columns are named IMEI, Serial Number and Phone Number.

 

  • Hi Anonymous 

     

    You can click Modeling > New table and enter the code into the formula bar. This will create a new table based on the original table.

     

    Or you can click Transform data to open Power Query Editor and try Remove Duplicates under Remove Rows. 

     

    If this doesn't work, please provide some sample data and expected result.

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.

4 Replies

  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hey Anonymous ,

     

    in general you can do that with the SUMMARIZE function. 

    The SUMMARIZE function will also keep BLANK and empty values.

     

    An approach would be:

    SUMMARIZE( myTable, myTable[IMEI], myTable[Serial Number], myTable[Phone Number])

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     
    • Anonymous's avatar
      Anonymous
      Not applicable

      Instructions on where I place that command ?  Somewhat new to FUNCTIONS in Power BI.  Could you provided steps on what/where I do this ?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Where do I enter this ?

       

      SUMMARIZE( serial, serial[IMEI], serial[Serial Number], serial[Phone Number])

      • v-jingzhang's avatar
        v-jingzhang
        Icon for Community Support rankCommunity Support

        Hi Anonymous 

         

        You can click Modeling > New table and enter the code into the formula bar. This will create a new table based on the original table.

         

        Or you can click Transform data to open Power Query Editor and try Remove Duplicates under Remove Rows. 

         

        If this doesn't work, please provide some sample data and expected result.

         

        Regards,
        Community Support Team _ Jing
        If this post helps, please Accept it as the solution to help other members find it.