Metabase: Proposal: Typeahead search should consider all values when linked to multiple fields

Created on 20 Mar 2018  路  1Comment  路  Source: metabase/metabase

Trying out the new search box. Awesome job!

TLDR - A dashboard filter hooked up to more than one distinct field will loose type ahead.

I have noticed that when a dashboard level filter is hooked up to multiple cards where these cards filter similar data but with different underlying fields the search box defaults to being a normal input entry box. I can understand why as type ahead was envisioned to work against a particular field. The problem is when there are multiple fields that represent the same set of data.

I propose that when a typeahead search references multiple fields a distinct union of the possible values across the fields.

Example 1 (Same data set):
This represents a use case where there is a database view that joins several tables under the hood.

  • Table T1 with field name N (id 1; values A, B, C)
  • View V1 on T1 with field name N (id 2; values A, B, C)
  • A card based on T1 and filtering on T1.N
  • A card based on V1 and filtering on V1.N

Typeahead would present A, B, C as possible values

Example 2 (Different data set):
This represents a use case where there are tables that roughly have the same data but differ for various reasons. For example, there could be a table with live data and a historical table. The live data might have new values that the historical table does not yet have; likewise the historical table could have values that have since been deleted from the live table.

  • Table T2 with field name N (id 3; values A, B, C)
  • Table T3 with field name N that roughly corresponds to T2.N (id 4; values A, B, D)
  • A card based on T2 and filtering on T2.N
  • A card based on T3 and filtering on T3.N

The current work around is to do a join such that all cards use the same underlying table when filtering. So in example 1 the V1 would join to the table and filter on T1.N. In example 2 a left join could be used from T3 to T2 on N and then filtering could be done on T2.N.

Browser: Chrome 64.0.3282.119
OS: Windows 7
Databases: Oracle 11g
Version: 0.29.0-SNAPSHOT 87565f4
Host Env: Windows 7
Internal Database: H2

P2 QueryinParameters & Variables Completeness

Most helpful comment

This is a huge drawback for making more complete and interactive dashboards, it will be a great improvement for Metabase!

>All comments

This is a huge drawback for making more complete and interactive dashboards, it will be a great improvement for Metabase!

Was this page helpful?
0 / 5 - 0 ratings