Table Fields Missing in from select list when setting up filters

Not sure if there is reason for this, but some table fields do not appear in the select list when setting up a filter on a dashboard.

It seems I need to specifically set the data type to either be a ‘category’ or a foreign key. For example. I have column named ‘email’ which contains email address. In the data model, I set the data type to “email”, because that’s what it is and I like Metabase to auto format it as an email address. However, now that column is no longer selectable as a filter for dashboards.

Hi @tuaris
There’s a list with the Field Types, which are supported for Field Filters:
https://metabase.com/docs/latest/users-guide/13-sql-parameters.html#the-field-filter-variable-type

Thanks. This makes it more clear. Is there a technical reason why those specific data types are not supported?

@tuaris I’m not exactly sure on the reason behind, which types are list-able or not.

@sbelak Sorry to ping again, but I don’t remember seeing an answer to why only some field types can show as lists, so can you enlighten us :wink:

It’s a performance consideration (emails tend to be relatively long strings and have high cardinality).

@tuaris mind sharing the use case? Knowing how you’d use this makes it easer for us to reevaluate our decisions and/or find ways for users to override limitations if need be.

1 Like

In my specific use case I wanted to give my users a way to identify “orders” placed by a specific person or persons that can be searched by email address (or even email domain).

1 Like

Just for reference:

The solution to this would be change the field type of the table in Metabase admin.
To do this, you can go to Metabase Admin > Data Models > Select your table > edit the type of the field to Category. You will be able to see it in filters now.