Order by multiple columns/Referencing entire column in data cell

When I try to refer to the column directly through the application with this code FILTER(...... ORDER BY $[MyInput][ColumnRef]") it doesn't work. I've tried filling the ColumnRef column with both text and formula versions of TableName[ColumnName] but neither work. Can anyone help me with this? Will this only work if I have an Evaluate function like in Excel?

I know that I can achieve this by assigning a filtered table to a cell and referencing it through a picklist, but I want to order by multiple columns and it isn't very practical to account for every possible permutation.

Hi @Hann-3036,

First off, welcome to the community! :slight_smile:

I can help you out with this.

Order By is the correct function for this, and you can include multiple columns to order by, with each being separated by a comma. (With the first column being ordered first, then the second ordering while maintaining the first column's ordering, and so on).

The formula would look something like:
=Filter(Table, "ORDER BY Table[Column 1 to order by] DESC, Table[Column 2 to order by] DESC")

Here's a good link, which has more info on using Order By and saving filters: How to Use Order By and Save Filters.

Saving filters as demonstrated in the link can also be a good way to check the syntax of your formulas. :honeybee: