Forum Discussion
How can I do a ' not in' in Power Query - New User
- Anonymous5 years ago
Indeed, it's the same concept. If you have TableA, with columns Name, Column2, and Column3, and another table, TableB, with columns Names and Departments. Any column in any table can be referred to as a list using the Table[ColumnName] syntax. So:
Table.SelectRows(TableA, each not List.Contains(TableB[Names], [Name]))
TableB[Names] is the column from the other table that you are referring to as a list, and [Name] is the column in your current table that you are turning into a list to compare to the first list.
Very useful!--Nate P.S. Please mark these as the answer. Thanks!
- Anonymous5 years ago
Hello,
I change the #ASB Home Office" source back to a table. I went into the advanced editor and tried the following:
#"Filter2" = Table.SelectRows(#"Changed Type1", each not Table.Contains(#"ASB Home Office"[group.member.displayName],[group.member.displayName]))
and I get the error:
Expression.Error: We cannot convert a value of type List to type Table.
I seem to have a data-type mismatch in that line of code.
Indeed, it's the same concept. If you have TableA, with columns Name, Column2, and Column3, and another table, TableB, with columns Names and Departments. Any column in any table can be referred to as a list using the Table[ColumnName] syntax. So:
Table.SelectRows(TableA, each not List.Contains(TableB[Names], [Name]))
TableB[Names] is the column from the other table that you are referring to as a list, and [Name] is the column in your current table that you are turning into a list to compare to the first list.
Very useful!--Nate P.S. Please mark these as the answer. Thanks!
Hello,
I change the #ASB Home Office" source back to a table. I went into the advanced editor and tried the following:
#"Filter2" = Table.SelectRows(#"Changed Type1", each not Table.Contains(#"ASB Home Office"[group.member.displayName],[group.member.displayName]))
and I get the error:
Expression.Error: We cannot convert a value of type List to type Table.
I seem to have a data-type mismatch in that line of code.
- Anonymous5 years agoNot applicable
Change Table.Contains to List.Contains.
--Nate