List.Difference Function in Power Query

The List.Difference function returns the items in list 1 that do not appear in list 2.

Syntax

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

Example:

Power Query M

let
  source = {"India", "America", "Canada", "Japan", "Australia", "England", "China"}, 
  return = List.Difference(source, {"America", "Nepal", "Japan"})
in
  return 

The output of the above code is shown below:

List.Difference function in Power Query