Sort a column based on another column

Hi Community,

I have a table with 3 columns viz Type, Item and itemCount. I want to display the values of column “Item” as a dropdown in my appsheet and I want that dropdown to be sorted based on the descending order values of column “ItemCount”. I used Orderby formula “orderby(variables2[_RowNumber],sort(variables2[ItemCount],true),true)” but this formula returns the key values of my table and not the values of column “Item”. I don’t think even the row keys are being returned in the correct sorted order.

Any help is greatly appreciated. Thanks in advance!

Solved Solved
0 6 1,664
1 ACCEPTED SOLUTION

Yes, a “dereference”. There’s a single dereference with the dot notation, and a list dereference like I just mentioned.

View solution in original post

6 REPLIES 6

There is no way to sort a non-key column by a different column in the Table, in a single expression.

You need to enter this formula into a column first:

ORDER(FILTER(...))

Then in another column/expression you can use a “List Dereference”

[above column][column wanted from sorted table]

Isn’t there any way to get a non key column from a key column. Sorry if it is a dumb question. I am new to appsheets.

Yes, a “dereference”. There’s a single dereference with the dot notation, and a list dereference like I just mentioned.

Thanks!

Steve
Platinum 4
Platinum 4

For reference:

Thanks Steve

Top Labels in this Space