Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Compare Data from different data source and delete the difference

Hi I would like to use the Power Query to delete the difference between 2 different data sources.

 

One dada source is Share point list. The columns are RequestNumberTitle, Status, Member ,ID and Comments.

RequestNumberTitle Status MemberIDComments
123Test1Closed***1***
234Test2New***2***
456Test3Updated***3***

The other one is Excel.The columns are Number, Title, Date, RequestNumberStatus.

NumberTitle DateRequestNumberStatus
4Test1 123Closed
5Test2 234New
6Test3 456Updated
7Test4 678New

 

I would like to compare them and the key column is RequestNumber, then delete the different row from Excel.

Could you please kindly tell how to set the Power Query? Thank you very much!

  • Hi Anonymous ,

     

    In Power Query, you can use merge to compare a column in one table with the column in another. The innerjoin type will keep only those rows that are found in the other table. Please see attached pbix for reference.

     

     

     

5 Replies

  • Hi Anonymous ,

     

    In Power Query, you can use merge to compare a column in one table with the column in another. The innerjoin type will keep only those rows that are found in the other table. Please see attached pbix for reference.

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      HI danextian Thank you very much.

      Could you please also kindly tell which Join Kind I should select if I only want to get the difference rows?

      • danextian's avatar
        danextian
        Super User

        Use Left Anti. This should keep only the rows that are in the first table. If a row exists in the other table, then that will be filtered out.

         

         

  • You can do merge query with Inner join and then delete the additional column.

    Then remove the additional column.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      HI SandeepSugandh Thank you very much.

      Could you please kindly tell which Join Kind I should select if I only want to get the difference rows?