Metabase Pivot table functionality with sql queries

Hi all, I am trying to write a query and then want to convert table into a Pivot table (with one aggregated column i.e. count, and three non aggregated - used within Group BY clause.
In this case, the option for pivot table is not appeared in visualization. Can someone please help with it.

Hi @rahul2712
Metabase needs to understand the columns in the query to be able to make a Pivot Table, so you'll have to use the SQL as the base in a new question:

In this case - is there any way to filter source sql question based on the filter in native question/dashboard ? If the source sql query has no filter and have to return all the data, it is not so optimal.

@michal.balaz No, filters are not parsed through from GUI to SQL. But if you return all results from SQL, and created a GUI question with that SQL question as the base, then you can apply filters there.

There are a lot of "hacks" and workarounds, but it would require more details.