Sort by fields missing

I never seem to see any useful fields to sort by in the question interface - e.g. I’ll have three fields in the view, but sort by will show none, or maybe only one of the fields. Any ideas? If I click on a column name and choose ascending / descending, there is an error and I have to start over w/ the question.

This is the error I get when clicking a column header and choosing ‘descending’ for example:
org.postgresql.util.PSQLException: ERROR: column “named” does not exist Position: 893

1 Like

Hi @kbitz
Which version of Metabase?
Are you using regular tables, Views, or?
Are you creating Custom Expressions or Custom Fields, and trying to order by those?
If you click the three-dots button (Additional Options) to the right, then you can create multiple sort by’s, whereas clicking the columns only sorts the selected column.

Thanks @flamber. Attached a screenshot here - you will see there are only 3 options in the sort menu, the ‘shipped tons’ field, which is a custom expression is not available.

Additionally, if I click on the column named ‘Shipped Tons’ and then choose ‘Ascending’ or ‘Descending’ it actually no longer throws an error but just doesn’t work at all - it sorts by a different column entirely.


Also, latest stable release of metabase. This question is using a table, not a view. I do have some custom expressions and custom fields.

Ahhh, okay, now I understand. That’s a limitation currently. Go and upvote by clicking :+1:

Thanks. I think it would also be good to improve the error message or at least make clear somewhere.