Cross-filtering


#1

Hi! I’ve been diving into Metabase a bit this week and I’m a huge fan so far! Really impressed with its features. I’m part of the City of Philadelphia’s Open Data program, and we help departments publish government data - like crime incidents, employee salaries, police complaints, etc. - to increase government transparency.

In addition to publishing the raw (CSV) data and an API, we try to accompany our data releases with a visualisation to make them more accessible to less technical users. We use a tool built in-house called VizWit. It primarily shows 3-5 charts grouped by key categories (e.g. crime category, date, zip code) and the raw data in a table, but the most significant feature it offers is cross-filtering: clicking on one of the categories will filter the other charts to only show the data within that category. Here’s an illustration:

This feature enables users to “drill down” on the data and answer questions such as, “How many thefts were there in my neighborhood last month?” without having to know what to do with a giant CSV file. As a result, our hope is that providing these visualisations broadens the audience for open data.

We would love to use Metabase (public dashboards) instead because of all the additional power it offers, plus the fact that we don’t have a lot of bandwidth to iterate on our in-house tool. But I can’t seem to accomplish the same cross-filtering functionality with Metabase. The built-in filtering feature seems to work quite differently, and requires you search for categories.

Is there any interest in cross-filtering for Metabase? If so, is there a way to collaborate on a feature like this?


Filter on pin map click
#2

Unfortunately for the time being that’s not a Metabase feature but there are a few partial hacks like putting html links in the text box functionality to go from one dashboard to the next. Search this forum for “drill down” and it will bring up a bunch of similar requests and do the same on Github:

Awesome illustration by the way!


#3

I guess with “cross-filtering” you are referring to the feature where you stay on a dashboard page when applying filters? That’s slightly different from a drill-down into an underlying question where you bring some filter parameters along with you on the navigation, then can add more filtering to refine further.

Metabase does have filtering on dashboards — but currently in a form where you’d have to pick your filter criteria in the drop downs — you can’t do it directly on the visualizations as you show above.

Technically Metabase employs the dc.js and crossfilter libs (those pages have demos similar to your example above). Here’s a search pointing to a few places where crossfilter appears directly in the codebase.

So it appears your proposal would build on the existing dashboard filtering feature but enhance it with an (optional?) alternative way to select. One UX thing that would need figuring out is that Metabase already use mouse clicks and scrubs on the visualizations to do e.g. drill-down. (On an impulse: Maybe it could simply just be added to the current menu that pops up when you click to focus on a series or point? - guess a prototype could verify if it’s viable).

I’m sure the Metabase core developers already might have considered crossfiltering. They are quite committed to keep “The Zen of Metabase” meaning they shy away from adding too many user options here and there but go to lengths that Metabase just defaults to the simple intuitive thing (I like that). On the other hand they welcome quality PRs, but keep a high bar to entry. The contributing section in the :blue_book: Developers Guide is a good starting point.

Sorry for the lengthy rant :wink: I’ll stop now.


Auto filter questions on Dashboard when a value is selected on any other question
Interactivity between questions in a dashboard (solved)
#4

So I see cross filtering is not available for now. Is there any discussion on adding it or has the thread ended with the above answer?


#5

As far as I understood from all over the issues and commends, the only way to have drill-through is having queries created by Query-Builder ONLY. So, is there any plan for custom queries? For example, I have a complicated PosgresSQL DB system and communicate with Metabase with Stored Procedures with parameters that return a Table. So, my queries into metabase are custom with filters and access those Stored Procedures that return tables and until now the whole system works fine. But if I need to drill-through I can’t make it working but only with custom queries. So, drill-through is out of question. Am I right or you suggest something else? By the way Metabase is an amazing Tool and I thank you for that.