Determining category filter selections

^^ My imported data set has certain column headings that I would like to use as categories. Metabase is recognizing most, but not all of them (5/10) and only allowing the categories that it recognized to be used in a Category filter.

What is determining what categories are offered in the category filter in Metabase? How can I get a more complete offering?

The Data Model section in the Admin Panel is primarily how Metabase determines which fields show up in Category filters. During DB introspection, MB tries to automatically guess the field types of each field in each table, but it doesn’t always get it right. So make sure the fields you want to use in a category filter are marked as Category under the type dropdown.

There are certain selections you can make with the type dropdown that will cause a field to not show up in the category filter dropdown menu:

  • Entity Key
  • URL
  • Time field with no type selected
  • High cardinality field with no type selected

So in your case, if you’re trying to get Publisher Name to show up in the filter list, make sure it’s set to Category in the Data Model section. Let me know if that works!

1 Like

Thanks for the reply maz. Changing Publisher Name to Category in the Data Model section worked, and now it’s appearing. Publisher Name is now a Category option, but the Publisher Names are not showing up in a drop down list format and requires the user to manually enter the correct Publisher Name. Is there a way to create a drop down for that filter Category?

Yeah, unfortunately the names will only show up with checkboxes if there are fewer than 40 distinct values (this is also true of category filters in the query builder). We went that route rather than displaying awfully long lists of like 500 checkboxes, but we know we’re missing some kind of search or filter. We plan on adding a “typeahead” search for ID filters (github issue #2739) and could possibly do the same for categories.

Here are the two relevant GitHub issues:

1 Like

Yeah, I just saw that in your literature - makes sense.

Within the categories are there ways to select only certain values/options that you want to show up? IE: if I have a list of cities under my “cities” category, but I only want to be able to filter for certain cities.

I can make a new post for this topic, so it’s searchable, if you’d like.

Yeah, if you want to create a new github issue that would be great. Regarding your last question, you can’t currently do that in MB, but we’re looking at ways to allow admins to curate dimensions/fields, so that’s one place where you might be able to choose which selections are available at a global level. At a per-filter level, I could imagine there being a way to add an options button for each filter.

How is it possible to edit the category field so that it displays the actual name instead of just category?

Sounds like you need to apply remapping:
I would recommend you open a new topic, since this topic is 3½ years old.