Table of contents
TOC
Collapse the table of content
Expand the table of content

List.Distinct

Owen Duncan|Last Updated: 4/19/2018

About

Filters a list down by removing duplicates. An optional equation criteria value can be specified to control equality comparison. The first value from each equality group is chosen.

For more information about equationCriteria, see Parameter Values.

List.Distinct(list as list, optional equationCriteria as any, criteria as any) as list  

Arguments

ArgumentDescription
listThe List to check.
optional equationCriteriaAn equality group equation.
criteriaFilter criteria.

Examples

List.Distinct({1, 2, 3, 2, 3}) equals {1, 2, 3}  
List.Distinct({"a","b","A"}, each _) equals {"a", "b", "A"}  
List.Distinct({"a","b","A"}, Comparer.FromCulture("en",true)) equals {"a", "b"}  
List.Distint({[a="a",b=2],[a="b",b=3],[a="A",b=4]},   
{ each [a] , Comparer.FromCulture("en", true) } )   
equals { [ a = "a", b = 2 ],   
//   [a = "b",  b = 3 ] }  
© 2018 Microsoft