How can I get pivot table

Hi everyone,

Could you please tell me how can I get pivot table ?
Do I have to use group by ? order by ? Sometimes when I use tables, I can use pivot table and sometimes I can’t.
I am using metabase V0.31.2

Thanks in advance

Hi @Livier

To create a Pivot table, you need to have 3 columns. An example would be:
View: Count of rows
Grouped By: Created Date and Category (or whatever is similar to your data)

You can enable/disable Pivot by clicking the Visualization :gear:

Example:

Thanks for your answer.
There is something that I don’t understand.
I found this link : https://github.com/metabase/metabase/pull/8427
Is there a way to have pivot table like excel on metabase ?

@Livier
No, sub-totals and totals (aka summaries) are currently not part of Metabase. That’s what the PR is about.

Thanks and sorry but what’s a PR please ?

Pull Request - that was what you linked to.

Oh ok, thank you very much for your answers

@flamber How to do pivot in v0.35? I don’t see this option.

@Timple You have to return a result with 3 columns - one numeric and two dimensions:
https://www.metabase.com/docs/latest/users-guide/05-visualizing-results.html#pivoted-tables
In the upcoming 0.38, it will be possible to do advanced pivots with “unlimited” columns and include subtotals.
Latest release is 0.37.6

1 Like

Looking forward to the subtotals. Hope it's in both ways (rows & columns).

The pivot table visualization was introduced in Metabase 0.38. Check out How to create a pivot table to summarize your data.