Force Pivot Axes

Hi, I have a problem with the Pivot option of the tables: it automatically switches axes.

It works great when there are more rows than columns (first pic)


Then when we apply some filters to dig into the results the axes are automatically switched if there are only a few rows (second pic)

How is this possible? How can I force an order? I’ve already entered my data in the correct pivot form:

  • row
  • column
  • value

Thanks

Hi Marco,
right now this is not possible, but there is a need for it and the guys from metabase seem to work on it:

Hi EvaS, thanks for your quick reply!

It’s a relief to know the guys are working on it :wink:

Hopefully it’ll be in one of the next releases

Interestingly (to me, any way), if you look in the Metabase database there are 3 fields at play:
dataset_query is the query itself
visualisation_settings - just sets whether or not the table should be pivoted (no ordering)
result_metadata - the data types of the data.

The first and last of these have the fields in the order in which you originally created the query. Swapping them makes no difference at all other than changing the order of the groups in the Grouped By list.

Edit: When you pivot, whichever axis has most values is assigned to the left. In my test I had 6 employees against order date with total sales.
With the date set to per quarter, the employees were down the left. With the date to to per month, employees across the top.