List.Difference

List.Difference(list1 as list, list2 as list, optional equationCriteria as any) as list

About

Returns the items in list list1 that do not appear in list list2. Duplicate values are supported. An optional equation criteria value, equationCriteria, can be specified to control equality testing.

Example 1

Find the items in list {1, 2, 3, 4, 5}that do not appear in {4, 5, 3}.

List.Difference({1, 2, 3, 4, 5}, {4, 5, 3})
1
2

Example 2

Find the items in the list {1, 2} that do not appear in {1, 2, 3}.

List.Difference({1, 2}, {1, 2, 3})