Forum Discussion

uc's avatar
uc
Helper II
4 years ago
Solved

Remove duplicates based on value on another column

Below is the sample data

 

IDDOBEthnicityEmail
101/01/2018British or Mixedaa.aol.com
101/01/2018Other Mixed 
202/05/2015British or Mixed British 
202/05/2015 Mixed Britishxx.bt.com
202/05/2015British or Mixed Britishxx.bt.com
301/06/2012Other Mixed

 

ww.bt.com

301/06/2012 

ww.bt.com

401/01/2011White and Asian

 

401/01/2011White and Asian

 

 

I want the output as

IDDOBEthnicityEmail
101/01/2018British or Mixedaa.aol.com
202/05/2015 Mixed Britishxx.bt.com
301/06/2012Other Mixed

 

ww.bt.com

401/01/2011White and Asian 

 

I have a table with duplicates and once I remove the duplicates I want to make sure records that have email addr is not deleted. any advise is greatly appreciated.

  • Hi uc ,

     

    Multi-select (Ctrl+click) [ID] and [DOB].

    On the Home tab, go to Group By.

    In the aggregate columns section at the bottom, create two aggregate columns as follows:

     

    New column name: Ethnicity

    Operation: Max

    Column: Ethnicity

     

    New column name: Email

    Operation: Max

    Column: Email

     

    This gives me the following output:

     

    Pete

4 Replies

  • Hi uc ,

     

    Multi-select (Ctrl+click) [ID] and [DOB].

    On the Home tab, go to Group By.

    In the aggregate columns section at the bottom, create two aggregate columns as follows:

     

    New column name: Ethnicity

    Operation: Max

    Column: Ethnicity

     

    New column name: Email

    Operation: Max

    Column: Email

     

    This gives me the following output:

     

    Pete

    • uc's avatar
      uc
      Helper II

      It works!! Thanks a lot 🙂

    • martaTr's avatar
      martaTr
      Frequent Visitor
      hi, my table is created by selected columns and union, so i cant use PQ, do you know any other solution for the same problem?
      • dufoq3's avatar
        dufoq3
        Community Champion

        Hi martaTr, could you provide sample data in usable format (read note below my post if you don't know how) and expected result based on sample data?