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

Colin1
New Member

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?

0 5 1,430
5 REPLIES 5

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

help.appsheet.com - SORT() SORT() help.appsheet.com

Use ORDERBY().

ORDERBY(FILTER(…), “SEQUENCE_ORDER”)

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.

SYNTAX

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

EXAMPLES

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

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

I’m having a hard time having the RESULTS display appropriately for my situation here.

ORDERBY(FILTER(“members”,TRUE),[COMBINEDN],FALSE)
This filters my referenced email to user (combinedN) list in alphabetical order for selection, however when I select two names I need them in a certain order based on another column…

I need to have the RESULTS ordered by a true/false column in the same sheet [PC] where the TRUE takes the first “spot” of 2 potential results.

No matter what i’ve tried today, the order of the results only comes back with the order of the users selected in the ref.

ORDERBY(FILTER(“members”,TRUE),[COMBINEDN],FALSE , [PC] , TRUE)

By the way, you might find better information on threads that aren’t 3 years old.

opps Didn’t even see that. Thanks I’ll give this this a try.

Top Labels in this Space