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?
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.
User | Count |
---|---|
43 | |
28 | |
24 | |
24 | |
13 |