OpenBI Docs Buy

List.RemoveItems

A list without any item that appears in a second list.

Group: List. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

List.RemoveItems(list1 as list, list2 as list) as list
ParameterTypeDescription
list1listThe list to remove from.
list2listThe values to remove.

Returns

list. The items of list1 not found in list2, every occurrence removed.

Examples

Without the discontinued products

List.RemoveItems({"Coffee", "Tea", "Milk", "Tea"}, {"Tea", "Juice"})
{"Coffee", "Milk"}

Both teas go; Juice was never there.

List.RemoveMatchingItems, List.Difference, List.Select.

Last updated · OpenBI Studio 0.3.79