I have 2 tables,

Table 1 Column1 Alex Barry Chris Column1 Name Miranda Fanta Barry 

I want to remove any rows from Table 1 that is present in Table 2 in the query editor

To do this, I need to create a column called as IsPresent in Table1.

Column1 IsPresent Alex No Barry Yes Chris No 

How can I create this IsPresent column using M? Is it even possible, if not why ?

1 Answer

You can certainly write a custom column for this

if List.Contains(Column1[Name], [Column1]) then "Yes" else "No" 

However, if your goal is just "to remove any rows from Table 1 that is present in Table 2" then you can do a left anti join instead of defining a custom column and filtering.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.