Forum Discussion
Exclude all items found in list in the dataset (Power Query)
- 7 years ago
I tried that but I'm getting an error (l_Exceptions is a list of text values, InspectionNo is a column of text values):
= Table.SelectRows(#"Expanded ExceptionList", each List.RemoveItems({[InspectionNo]}, l_Exceptions))Expression.Error: We cannot convert a value of type List to type Logical.
Details:
Value=List
Type=TypeEdit: So I;m getting the error from the code aboe because List.RemoveItems returns a list and I need a logical value for the Table.SelectRows. Anyway, I found my answer here: Found the solution here: https://eriksvensen.wordpress.com/2017/12/12/powerquery-filter-a-table-based-on-another-table-column-or-list-and-some-filter-ahas/
= Table.SelectRows(step, each List.Contains(l_Exceptions, [InspectionNo]) = false)
Hi olimilo
You can use List.RemoveItems
https://docs.microsoft.com/en-us/powerquery-m/list-removeitems
I tried that but I'm getting an error (l_Exceptions is a list of text values, InspectionNo is a column of text values):
= Table.SelectRows(#"Expanded ExceptionList", each List.RemoveItems({[InspectionNo]}, l_Exceptions))Expression.Error: We cannot convert a value of type List to type Logical.
Details:
Value=List
Type=Type
Edit: So I;m getting the error from the code aboe because List.RemoveItems returns a list and I need a logical value for the Table.SelectRows. Anyway, I found my answer here: Found the solution here: https://eriksvensen.wordpress.com/2017/12/12/powerquery-filter-a-table-based-on-another-table-column-or-list-and-some-filter-ahas/
= Table.SelectRows(step, each List.Contains(l_Exceptions, [InspectionNo]) = false)