List.Difference
返回两个给定列表的差。
Syntax
List.Difference(
list1 as list,
list2 as list,
optional equationCriteria as any
) as list
Remarks
返回未出现在列表 list2 中的列表 list1 中的项。支持重复的值。 可以指定一个可选相等条件值 equationCriteria 来控制相等测试。
Examples
Example #1
查找列表 {1, 2, 3, 4, 5} 中未出现在 {4, 5, 3} 中的项。
List.Difference({1, 2, 3, 4, 5}, {4, 5, 3})
Result:
{1, 2}
Example #2
查找列表 {1, 2} 中未出现在 {1, 2, 3} 中的项。
List.Difference({1, 2}, {1, 2, 3})
Result:
{}
Category
List.Set operations