Forum Discussion
How to filter a column from items in another dataset column
- 2 years ago
You should be able to use List.Contains to filter the table.
Consider the example data...
itemTablecriteriaTable
you can select rows from itemTable that are not in the criteriaTable adding this line to itemTable
= Table.SelectRows(PREVIOUSSTEP, each not List.Contains(Table.ToList(crtiteriaTable), [Item]))
if you wanted to select rows that matched the criteria, you would remove the 'not' from the above code.
Hope this gets you pointed in the right direction.
You should be able to use List.Contains to filter the table.
Consider the example data...
itemTable
criteriaTable
you can select rows from itemTable that are not in the criteriaTable adding this line to itemTable
= Table.SelectRows(PREVIOUSSTEP, each not List.Contains(Table.ToList(crtiteriaTable), [Item]))
if you wanted to select rows that matched the criteria, you would remove the 'not' from the above code.
Hope this gets you pointed in the right direction.
I'm running into an error inputting the code into the table the "PREVIOUSSTEP" portion in the code is not a selectable option an errors when I input it manually.