Forum Discussion

ljx0648's avatar
ljx0648
Helper III
2 years ago
Solved

How to remove duplicate based on one condition

Hi guys,   I have a rather simple data table structure like below:   ID Assigned to Phone Available 1 A YES 1 A YES 2 B NO  2 B YES 3 C NO 3 C NO   I need ...
  • audreygerred's avatar
    2 years ago

    Hi! I have the following data entered:

     

    In Power Query, I sorted Phone descensding so that all the Yes are above all the No. I then added an index column, and then removed duplicates on ID. VIOLA! It keeps the first instance in the list which will be Yes because of the sorting and indexing.