List.Union Function in Power Query
The List.Union function returns a list from a list of lists and unions the items in the individual lists. The returned list contains all items in any input lists. In this function at the time of merging the lists the duplicates are removed. It is different from the List.Combine function where at the time of merging the list the duplicates are retained.
Syntax
List.Union(lists as list, optional equationCriteria as any) as list
Example:
Power Query M
let list1 = {"Ashish", "Esha", "Katrina"}, list2 = {"Samyukta", "Esha", "Jennifer"}, list3 = {"Alia", "Warina", "Katrina"}, return = List.Union({list1, list2, list3}) in return
The output of the above code is shown below: