List.Difference

 

This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.

Returns the items in list 1 that do not appear in list 2. Duplicate values are supported.

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

ArgumentDescription
list1The List to check with.
list2The List to check against.
optional equationCriteriaAn optional equation criteria value to control equality comparisons. For more information about equality comparisons, see Parameter Values.
List.Difference({1..10}, {2..3,5..7}) equals {1,4,8,9,10}  

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

List.Difference({1, 1, 1}, {1}) equals {1, 1}  

Show: