Cannot change sort type from ascending to descending and vice versa

Hi everyone!

I'm new to metabase. I created a question and I do have date field on my data source. I sort my date field to ascending and it run successfully. However when I want to change from ascending to descending, I got an error saying that

There was a problem with your question
Most of the time this is caused by an invalid selection or bad input value. Double check your inputs and retry your query.

ERROR: column "posts.post_date" must appear in the GROUP BY clause or be used in an aggregate function Position: 613

I tried to change the sort type through three dots button and it run sucessfully. this is weird since there's no problem with my data.

Any idea how to fix this issue?

Thanks,

Pram.

Hi, I still work with v0.25 but for me it seems to work (if I got right what you are doing).

I would try two things:

  1. the error message details tell you that the post date should be in the grouped by section - have you tried that? Depending on your data metabase might think that you want to aggregate data and for that you have to put the relevant field in the grouped by section.

If that doesn´t solve the problem, try that:
2) sort the result using the sort section rather than trying to sort within the results:

grafik

You find it right next to grouped by (there are 3 dots). You can there pick a field to sort by. Does it still show the error or does it work?

Hope you figure it out :slight_smile:
Cheers, E