Pivot Sorting not working

I have created a small pivot table based on the sample database in the latest version.

I have set the sort order based on the month of year, but it does not appear to sort at all. See screenshot.

Is this a bug, or am I doing something really dumb?

1 Like

This is on Metabase 0.25.2 on a Mac.

I don´t have a solution but would like to second the request. Its similar when you build it in sql syntax, it seems that I can´t tell metabase what categories to take as rows and what as columns. Would be a nice feature!
Thanks, Eva

1 Like

Hi Metabase owners, is this maybe not the right place to ask these questions?

According to my experience, it will order the data alphabetically, regardless of expressed values. So, in our case, it is properly ordered, both in columns and rows - ascending. IF you want to order by months, you need to pick the number of the month, instead of its name

Metabase will use always the first field as rows, and the seconds as column, so, if you need to change it, just change the order in which you pick them in the selector or in the query (in case of native SQL questions).

The datatype in your ‘month of year’ field seems to be varchar/text. It is sorting the month numbers in this order -> 1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9. If the datatype is date/integer, the sort should work just fine.

1 Like