EvaS
November 20, 2017, 4:16pm
1
Hi,
does anyone have an idea how I can change this table to have the date in the column headers rather than in the first row?
So it should look like that:
I don´t think its doable with the query builder, but maybe it is possible in SQL?
Thanks for any help!
Eva
EvaS
November 21, 2017, 7:46am
3
Hi, thank you! But sadly that still does not give me the possibility to change row and column in a pivot table … :-/
As I use SQL for almost all of my queries anyway I was hoping there is a way to decide in SQL which data the columns are and which the rows?
Thanks, cheers, Eva
jornh
November 21, 2017, 5:21pm
4
Sad … was worth a shot though!
Then I guess it’s depending more on the database you use than Metabase itself. For example Postgres has crosstab
:
https://www.postgresql.org/docs/9.6/static/tablefunc.html
(found via Pivot the result of a SQL query BTW, so thanks there I also learned something)
1 Like
jornh
November 21, 2017, 8:04pm
5
Watch out possibility of more and ahead - just stumbled on Pivot with crosstab() works on DB but not on MetaBase so maybe you need to bulk transform into a new table before feeding it to Metabase … or something.
EvaS
November 22, 2017, 7:17am
6
Uhh will check that out! Thanks!