Unable to update dashboard filter with desired column

The Setup:

I have two tables, a member table containing details about members (name, uuid, email, etc ), and a content_progress table, which tracks a member's progress through some piece of video content (FK content id, FK member id, content_progress_percentage).

I have a question (Q1) built with the notebook editor, where I am summarizing average content_progress_percentage and the count of rows in the content_progress table (so "items consumed" or pieces of content which have content_progress_percentage > 0) by member id. What I end up with is a table like so:
Member ID | Member Name | Items Consumed | Average Progress

I then have another question (Q2), this one SQL-based, where I am retrieving another set of members who are linked to a selected member in the previous question. I am using a field filter mapped to Members > ID.

Both questions have been placed on the same dashboard.

I added an ID filter to the dashboard and wired it to filter Q2 on Member ID.

The Problem:

The desired functionality is to click a member's name in Q1 and have the Member ID in Q1 be applied to the ID filter, thereby filtering the results of Q2.

When I try to customize on-click behaviour for a column in Q1, select the Name column, select update a dashboard filter, then select the dashboard filter to update, there is only one available column I can use from Q1 (the count of items consumed).

Why can't I update the dashboard filter with Member ID (or any other value) from Q1?

Hi @wj4
Post "Diagnostic Info" from Admin > Troubleshooting.

Sounds like you are seeing this issue, so instead of using ID filters, change the field type in the model to "No semantic type" and just use regular Text/Category filter on the dashboard.
https://github.com/metabase/metabase/issues/15170 - upvote by clicking :+1: on the first post

You're suggesting I change the the field type for my ID column in the Member table to "no semantic type"? Won't that impact my ability to use Member ID as a primary key or "Entity Key" elsewhere?

@wj4 Yes, so if that doesn't work for you, then you'll have to use the workaround as noted in the issue, use Custom URL.

That would create the same problem, no? This table is a central table in our database, to which nearly every other table will refer. Changing ID from Primary Key to any other data type would impact our ability to use metabase drill down features, wouldn't it?

Using a primary or foreign key as a filter seems like a pretty common need out of a BI tool. Is there an expected timeline for a fix on this?

@wj4 There are 2000+ other issues. I cannot give you are timeline on that issue.

How about this: what if I wanted to do the exact same thing, but I have Q2 use a field filter for the member's email address (data type = Email)? That way Im not using any PKs or FKs.

I can now update the email filter on the dashboard by clicking a member on Q1, but the field filter in Q2 is not acknowledging the content of the filter and always returns zero results. If I swap the field filter out for the regular variable syntax, I can input an email directly into the variable in Q2 and the correct results are returned. If I use a regular variable in the SQL of Q2, however, the dashboard filter can't access it at all.

The settings for the field filter in Q2

@wj4 You are using "String Contains" - just use String, then it should work.

Not available:

If I change Email type to Entity Name, I can select string.

Even so, changing it to Entity Name (and manually syncing the database in Admin > Databases to force the rescan, per documentation), then selecting String does not fix the problem.

@wj4 Sounds like you are not using latest release. Change it to "Category".
You don't need to reference the documentation to me, I know how Metabase works and what you need to do to workaround some issues, but post "Diagnostic Info" from Admin > Troubleshooting.

You're right - I am not on the current release. I'm still working with the team to get that updated.

That doesn't seem to work either, though.

Is this just another case of update and try again?

Diagnostic:

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.14.1+1",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.14.1",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.14.1+1",
    "os.name": "Linux",
    "os.version": "5.10.102-99.473.amzn2.x86_64",
    "user.language": "en",
    "user.timezone": "Canada/Atlantic"
  },
  "metabase-info": {
    "databases": [
      "h2",
      "postgres"
    ],
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-03-23",
      "tag": "v0.42.3",
      "branch": "release-x.42.x",
      "hash": "33fb268"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

P.S. I am trying to leave documentation links in case future users stumble across this post.

@wj4 There has been a lot of changes to fields the past few versions, so try upgrading. It's working fine, when I try to reproduce based on your description.
Otherwise try reproducing using the Sample Database, since then we can all play along.

And you should not be using H2 in production:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

1 Like