Troubleshooting filters
It’s always a good idea to start with a quick sanity check:
- Clear your browser cache.
- Refresh the page.
- Open your question or dashboard in an incognito window.
Dashboard filters
- Click the pencil icon to go into edit mode.
- Click the gear icon beside your filter widget.
- Make sure you’ve selected a column for your filter under Column to filter on.
- If you can’t find the right Column to filter on, or you’re getting “No Results” when you apply the filter:
- Exit edit mode and click on a dashboard card to go to the original question.
- Follow the troubleshooting steps under Question filters.
Question filters
- Make sure the question includes the column you want to filter on.
- Check that the column actually contains the value(s) you’re filtering on. You can do this by:
- sorting number or date columns,
- creating a “contains” filter for string columns, or
- asking your database admin.
- Ask your Metabase admin to help you check if:
- Metabase is up to date with your database,
- the column is visible in Metabase,
- you have the correct data permissions to access the column.
Special cases
If you’re having trouble filtering on a:
- Custom column: check if the custom expression is working as expected. For example, your custom expression might be returning blank values when you expect numbers.
- SQL field filter: make sure you’re using the correct field filter syntax, then see Troubleshooting SQL variables.
Explanation
When we first set up a filter, we need to link the filter to a column. If we make the wrong assumptions about a column’s values or data type, the filter won’t work at all. If a column changes, the filter might suddenly stop working.
For example, let’s say we want to create a filter named “Select Product ID” linked to a column named Product ID. The filter won’t work if any of these things happen:
- Our question doesn’t include the Product ID column.
- We type the number 4 into the “Select Product ID” filter, when the Product ID column only contains the values 1, 2, and 3.
- Product ID is renamed to something else in the database or Data Model page.
- Product ID is deleted from the database, or hidden in the Data Model page.
- Product ID is a custom column that’s not working as expected.
- We don’t have data permissions to access the Product ID column.
- We made “Select Product ID” a numerical filter, but Product ID is a string column (see the section below).
Time, ID, and number filters
If you’re not a Metabase admin, you might have to ask your admin to help you with this.
- Find the data type of the column that you want to filter on. You can find this info from:
- the Data reference,
- the Data Model page (admins only), or
- directly from the database.
- Cast the column to a data type that matches the desired filter type. You can:
- cast strings or numbers to dates from the Data Model page, or
- change the data type of the column in your database, and re-sync the database schema.
Explanation
Metabase needs to know the data type of a column in order to present you with a curated selection of filter types. Sometimes these columns are mistyped—if a column stores your numbers as strings, Metabase will only show you text or category filters (with options like “is”, “is not”) instead of number filters (with options like “greater than”, “less than”).
Timestamps, in particular, are the root of all evil, so please be patient with your Metabase admin (or yourself!) when trying to get the data type right.
Related topics
- Troubleshooting linked filters
- Troubleshooting SQL variables
- Troubleshooting dates and times
- Creating dropdown filters
- Creating SQL filters
- Field filter gotchas
Are you still stuck?
If you can’t solve your problem using the troubleshooting guides:
- Search or ask the Metabase community.
- Search for known bugs or limitations.