Power Query
published
Search
⌃K

List.RemoveMatchingItems

List.RemoveMatchingItems

Removes all occurrences of the input values.
function (list1 as list, list2 as list, optional equationCriteria as nullable any) as list

Description

Removes all occurrences of the given values in list2 from the list list1. If the values in list2 don't exist in list1, the original list is returned. An optional equation criteria value, equationCriteria, can be specified to control equality testing.

Category

List.Transformation functions

Examples

Create a list from {1, 2, 3, 4, 5, 5} without {1, 5}.
List.RemoveMatchingItems({1, 2, 3, 4, 5, 5}, {1, 5})
{2, 3, 4}