List.RemoveItems

Eliminates all instances of the specified values in list2 from list1. If the values in list2 are not found in list1, the original list is returned.

Syntax

List.RemoveItems(list1 as list, list2 as list) as list

About

Eliminates all instances of the specified values in list2 from list1. If the values in list2 are not found in list1, the original list is returned.

Explanation

Eliminate the elements 2, 4, and 6 from the list {1, 2, 3, 4, 2, 5, 5} using the Power Query MList.RemoveItems function. The resulting list will be {1, 3, 5, 5}.