Skip to content
Snippets Groups Projects
Unverified Commit f4213d68 authored by metabase-bot[bot]'s avatar metabase-bot[bot] Committed by GitHub
Browse files

docs - update filters troubleshooting guide (#30203) (#30238)


Co-authored-by: default avatarNatalie <nat@metabase.com>
parent 510e649a
No related merge requests found
......@@ -223,7 +223,7 @@ To update the values in your filter dropdown menus, refresh or reset the cached
1. Go to **Admin settings** > **Data Model**.
2. Find your database and table.
3. Click **gear** icon at the right of a column's settings box.
3. Click the **gear** icon at the right of a column's settings box.
4. Scroll to **Cached field values**.
5. Select a cache action.
......
......@@ -2,7 +2,6 @@
title: Troubleshooting filters
---
# Troubleshooting filters
It's always a good idea to start with a quick sanity check:
......@@ -13,6 +12,8 @@ It's always a good idea to start with a quick sanity check:
## Dashboard filters
If a dashboard filter is giving you no results or the wrong results:
1. Click the **pencil** icon to go into edit mode.
2. Click the **gear** icon beside your filter widget.
3. Make sure you've selected a column for your filter under **Column to filter on**.
......@@ -22,6 +23,8 @@ It's always a good idea to start with a quick sanity check:
## Question filters
If a question filter is giving you no results or the wrong results:
1. Make sure the question includes the column you want to filter on.
2. Check that the column actually contains the value(s) you're filtering on. You can do this by:
- sorting number or date columns,
......@@ -41,7 +44,7 @@ If you're having trouble filtering on a:
**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.
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 on the database side, 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:
......@@ -55,7 +58,7 @@ For example, let's say we want to create a filter named "Select Product ID" link
## Time, ID, and number filters
If you're not a Metabase admin, you might have to ask your admin to help you with this.
To debug dashboard and question filters that involve timestamps, UUIDs, or numeric data:
1. Find the [data type](https://www.metabase.com/learn/databases/data-types-overview) of the column that you want to filter on. You can find this info from:
- the [Data reference](../exploration-and-organization/data-model-reference.md),
......@@ -65,12 +68,29 @@ If you're not a Metabase admin, you might have to ask your admin to help you wit
- [cast strings or numbers to dates](../data-modeling/metadata-editing.md#casting-to-a-specific-data-type) from the Data Model page, or
- change the data type of the column in your database, and [re-sync](../databases/sync-scan.md#manually-syncing-tables-and-columns) the database schema.
If you're not a Metabase admin, you might have to ask your admin to help you with some of these steps.
**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.
## Missing or incorrect filter values
If your filter dropdown menu displays the wrong values for a column:
1. Go to **Admin settings** > **Data model**.
2. Find your database, table, and column.
3. Click the **gear** icon at the right of a column’s settings box.
4. Scroll to **Cached field values**.
5. Optional: click **Discard cached field values**.
6. Click **Re-scan this field**.
**Explanation**
Metabase [scans](../databases/sync-scan.md#how-database-scans-work) get the values for your filter dropdown menus by querying and caching the first 1,000 distinct records from a table. You might see outdated filter values if your tables are getting updated more frequently compared to your [scan schedule](../databases/sync-scan.md#scheduling-database-scans).
## Related topics
- [Troubleshooting linked filters](./linked-filters.md)
......@@ -79,7 +99,6 @@ Timestamps, in particular, are the root of all evil, so please be patient with y
- [Creating dropdown filters](../data-modeling/metadata-editing.md#changing-a-search-box-filter-to-a-dropdown-filter)
- [Creating SQL filters](../questions/native-editor/sql-parameters.md)
## Are you still stuck?
If you can’t solve your problem using the troubleshooting guides:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment