Crosstab / Pivot (Postgresql)


#1

Hi,

I was wondering if there is an option to create cross tab / pivot tables in Metabase. I want to group data in a way:
Site, Category Name in the rows, and last 6 months in columns, and the amount of orders as the calculated number in the centre of the matrix.

                                Jan-18       Feb-18   Mar-18    Apr-18        May-18     Jun-18

Site 1 | Breakfast 5 7 9 11 15 18
Site 1 | Lunch 11 12 14 8 14 13


#2

There are cross-tabs, but you can’t have a nested dimension (site, category in your example),
Workaround is to use a custom query and concatenate the value of site & category to make one field.