Categorical field filter does not list values when used in dashboard

Hi! I’m having an issue with listing values in filter. Basically, I have native SQL question with a field filter on a categorical column. When I use the filter in the question, it provides a list of all the possible values for me to select from, which is what I want. However, when I put that question in a dashboard and then link a dashboard filter to it, it does not list values, and instead says “Enter some text”. What is really curious is that when I go to select a default value for the dashboard filter, it does show a list of values! Any help would be greatly appreciated.

Also, I’m using Postgres for the question, have set the column in the data model to categorical, and specified filters on it to list all values.

{
  "browser-info": {
    "language": "en-US",
    "platform": "MacIntel",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.7+10",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.7",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.7+10",
    "os.name": "Linux",
    "os.version": "4.9.0-11-amd64",
    "user.language": "en",
    "user.timezone": "UTC"
  },
  "metabase-info": {
    "databases": [
      "postgres",
      "googleanalytics",
      "snowflake",
      "athena"
    ],
    "hosting-env": "unknown",
    "application-database": "postgres",
    "application-database-details": {
      "database": {
        "name": "PostgreSQL",
        "version": "11.8"
      },
      "jdbc-driver": {
        "name": "PostgreSQL JDBC Driver",
        "version": "42.2.8"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2020-12-03",
      "tag": "v1.37.3",
      "branch": "release-x.37.x",
      "hash": "2f1e783"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

Hi ,
I hope to help you.
As you said that the values are shown in the questions so for sure you mapped the filter type to field filter and select the column that you want to mapped .
Now go to the dashboard :

  1. Create a new filter with the same name that you created in the question
  2. Click on edit button and select the field on the chart so now the filter will be mapped to these values across the dashboard

please let me know if you need more clarification :slight_smile:

Hi @bora_uyu
I am not able to reproduce this problem. And I can see that you have gone through most of the typical problems.
Is the filter connected to multiple cards or just a single card on the dashboard?
If you remove the filter, save the dashboard, and then add the filter again - does it then work correctly?
Do you see any errors in the browser developer console?

The filter is only connected to that card. I tried removing and adding the filter. I couldn't find any errors out of the ordinary, but I did see this warning (when you open values it does list all the values).

@bora_uyu
Interesting. Not quite sure what’s going wrong.
If you create a new question with the similar query, and add it to a new dashboard, are you still not seeing the dropdown list?
Can you reproduce with the Sample Dataset database?

Yep, happens even if I make a new question. What Sample Dataset database are you referring to?

@bora_uyu Go to Admin > Databases - then all the way in the bottom you should have an option to add the Sample Dataset. The point with that is that you can provide steps to reproduce issues, which we can then all validate - makes it a lot easier to fix issues, when it’s not something specific to your dataset.

Ah I found the issue, it turns out my table is too large so it’s taking too long to find the distinct values. I’ve found a work-around. Thank you for the help!

@bora_uyu Ahhhh, you are seeing this issue probably:
https://github.com/metabase/metabase/issues/7603 - upvote by clicking :+1: on the first post