Sort FILTER results It would be nice if this...

(Colin) #1

Sort FILTER results

It would be nice if this could also suggest how to sort the list of references using one the columns in the table it was filtered from.

Is there a simple way of doing so? Or an example? For example a table might have a column like SEQUENCE_ORDER. How could it be used to sort the result of the filter? Might it have to be done before the FILTER expression is applied to the table?

(Simon Robinson) #2

SORT(FILTER(table-name, select-row),TRUE) - SORT() SORT()

(Steven Coile) #3



The first argument is a list of row references (as generated by FILTER() or by a SELECT() returning key column values).

The second argument is the name of the column in the table referenced by the rows in the first argument to sort by.

An optional third argument is a Yes/No value (TRUE or FALSE) to indicate sorting direction: FALSE (the default) for ascending/A-Z/0-9, or TRUE for descending/Z-A/9-0.

Additional sorting columns and sorting directions can be included in pairs.


ORDERBY( rows , column [ , descending? [ , column ] ]… )


ORDERBY(Employees[EmpID], “Last Name”, FALSE, “First Name”)

ORDERBY(FILTER(“Events”, ([When] <= TODAY())), “When”, TRUE)