Need simple row→column (transpose) + remove pivot column-count limitation

Hi team,

The main gap I’m facing in Metabase is the lack of a simple way to convert rows to columns (transpose) in the UI.

For example, starting with:

mth        | first_col | second_col | third_col
-----------|-----------|------------|----------
2025-01-01 | 100       | 80         | 40
2025-02-01 | 50        | 30         | 10
2025-03-01 | 300       | 230        | 100

I want:

metric     | 2025-01-01 | 2025-02-01 | 2025-03-01
-----------|------------|------------|------------
first_col  | 100        | 50         | 300
second_col | 80         | 30         | 230
third_col  | 40         | 10         | 100

Core issue

There’s no straightforward way to do this in Metabase without writing fairly complex SQL (unnest/array transformations). A simple built-in “rows ↔ columns” (transpose) option would solve this cleanly.

Secondary issue (pivot limitation)

Even after reshaping the data:

  • The pivot option only appears with exactly 3 columns

  • Adding any extra column (e.g., for ordering like ord) disables pivot

  • This forces awkward multi-step workarounds

Suggestions

  1. Add a native “rows ↔ columns” (transpose) transformation

    • No SQL required

    • Works directly in the query builder / visualization layer

  2. Allow pivot with ≥3 columns (not exactly 3)

    • Let users choose which fields to use for rows, columns, and values

    • Don’t hide pivot based on column count

These changes would remove the need for complex SQL and eliminate current UI quirks, making common reshaping tasks much more intuitive.

Thanks!

Reference Images:

base_data

pivot_option_visible_with_three_columns

final_pivot_view

Seems like you solved your own problem. Build your query to output rows like in pivot_option_visible_with_three_columns. Metabase prefers data in that format, though it causes problems with row limits with large input sets.

Yes, i got a working solution, but I wanted to know if there is any easy row<>column transpose option in metabase or if people we should request this feature.

You're not crazy, this has been on the wishlist since 2016 (#3769). Good news: someone just opened a PR for it two weeks ago, #73154, adds a Transpose toggle right in pivot settings. It's waiting for review, so a :+1: from you helps it move.

Cheers, Nick @ Valiotti Data