Equation criteria
In the world of data, determining equality isn’t always straightforward. Equation criteria enable us to identify differences or commonalities between two values.
Equation criteria are used to determine equality and match data in tables or lists according to specific logic. In this section, we will explore various ways to specify equation criteria in the M language. We will use the List.Contains
function to illustrate how these methods help to establish control over equality testing.
Default comparers
In this chapter, we have already covered the role of comparer functions at length, which is to provide a method to compare values, determining their relative order and equality. Therefore, you can simply pass a default comparer as equationCriteria
. Here, the selected comparer acts like a built-in rulebook that List.Contains
follows when comparing values. By ignoring case sensitivity, New York
and new york
are considered to be equal:
List.Contains...