List.Difference
Returns the difference of the two given lists.
Syntax
List.Difference(
list1 as list,
list2 as list,
optional equationCriteria as any
) as list
Remarks
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.
Examples
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})
Result:
{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})
Result:
{}
Category
List.Set operations