Category (dropdown) filtering nested (saved) questions on dashboards

Hello, there.

  1. Create a question using Metabase’s graphical builder (so it’s not a native query) displaying data as Table and save it as a Saved Question.

  2. Make a new question aggregating some data (i.e. showing a chart or similar) based on the previous Saved Question as its source.

  3. Embed the question from (2) into a dashboard.

4. Add a Category filter to the dashboard and try to achieve “dropdown category functionality” on that filter for questions deriving from Saved Questions - impossible? Instead, a text-input filter shows.

I’ve tried putting directly the Table-view question from (1) into the dashboard and I can indeed categorically filter data using a dropdown that correctly populates.

My bet is that saved questions are not parsed by Metabase internally and searched for their distinct values to be later used as dropdown-filter values. Correct?

A possible solution would be having Saved Questions within Administration - Data Model to set properties such as “Category” or “Foreign Key” on those saved questions as well, but hey, that is not implemented. :slight_smile:

I am thinking of a workaround:

  • create new questions showing all distinct values for fields I want to filter with dropdowns,
  • create a HTML page embedding my dashboard (and hiding Metabase filters by means of CSS),
  • putting my own HTML filter elements above the dashboard iframe and populating them with values from the first bullet (distinct field values) by accessing those questions via Metabase API
  • when my HTML filter elements are changed, I refresh the dashboard iframe by changing its src attribute as I have to append ?filtername=filtervalue based on what the users clicked on my own filter elements

A lot of work to achieve quite a little, to be honest.

Any comment would be appreciated.


Hi @denis.pavliha
You are seeing this issue: - upvote by clicking :+1: on the first post

1 Like

Damn, there’s an issue on GitHub and it’s been there from July. Why can’t 2020 give us a break already… :sob:

Maybe if I sent a beer to @sbelak and @nemanjaglumac that could speed things up. :thinking:

Also, thanks for the feedback, @flamber, appreciate it.