Comparison criteria
Now examine the books on your shelf; do you notice one that is out of place? Take it. Determining its proper location requires comparison. You will compare the book in your hands to others on the shelf by applying specific criteria, repeating that process until you find its rightful place. The same holds true
for data. By setting relevant criteria, you can order it in meaningful ways, such as ordering month names from January to December, weekdays from Monday to Sunday, and so on.
Comparison criteria can be used to arrange data according to specific logic. In this section, we will explore various methods provided by the Power Query M language for defining comparison criteria to order values. We’ll use the List.Sort
and Table.Sort
functions as examples to show how you can create custom rules and gain exact control over the ordering of data.
Numeric value
When sorting data using Table.Sort
, you can designate any numerical value to signify a desired...