Skip to content
Snippets Groups Projects
Unverified Commit 10fc583f authored by Jeff Bruemmer's avatar Jeff Bruemmer Committed by GitHub
Browse files

docs - add time grouping (#47930)

parent 9e6c8a05
No related branches found
No related tags found
No related merge requests found
......@@ -4,42 +4,46 @@ redirect_from:
- /docs/latest/users-guide/08-dashboard-filters
---
# Dashboard filters
# Dashboard filters and parameters
![Dashboard Filters](./images/filters.png)
Have you ever found yourself in a situation where it seems like you need to create nearly identical copies of the same dashboard, with just one different variable? Maybe you have an Earnings dashboard, but you want to see the data for each city your business is in, or maybe you have a KPI dashboard that you want to see broken out by month.
Instead of creating duplicate dashboards, you can add filter widgets to let people change variables for cards on a dashboard.
Instead of creating duplicate dashboards, you can add filter or parameter widgets to let people change variables for cards on a dashboard.
## Adding a new filter
## Adding a filter or parameter
![Add a Filter](./images/add-filter.png)
- Click the **pencil icon** to enter dashboard editing mode.
- Click the **filter icon** that appears in the top-right to add a filter.
- Select a [filter type](#filter-types).
- [Connect your filter](#connecting-a-filter-to-dashboard-cards) to one or more dashboard cards on any or all tabs.
- [Configure your filter](#editing-a-filter).
- Select a [filter type](#filter-and-parameter-types)
- [Connect your filter or parameter widget to dashboard cards](#connecting-a-filter-or-parameter-widget-to-dashboard-cards) to one or more dashboard cards on any or all tabs.
- [Configure your filter](#editing-a-filter)
- **Save** your changes.
Metabase will display the filter only if the filter is connected to a card on the current dashboard tab.
## Filter types
## Filter and parameter types
You can choose from a number of filter types:
The type of filter or parameter widget you choose will determine how the widget works, as well as which fields you’ll be able to filter your cards by.
- [Time](#time-filters)
### Filter widgets
- [Date picker](#date-picker-filters)
- [Location](#location-filters)
- [ID](#id-filter)
- [Number](#number-filter)
- [Text or categories](#text-or-category-filter)
- [Text or category](#text-or-category-filter)
### Parameter widgets
The type of filter you choose will determine how the filter works, as well as which fields you’ll be able to filter your cards by.
- [Time grouping](#time-grouping-parameter)
### Time filters
## Date picker filters
When picking a Time filter, Metabase will prompt you to pick a specific type of filter widget:
When picking a Time filter, Metabase will prompt you to pick a specific type of date picker widget:
- Month and Year
- Quarter and Year
......@@ -50,7 +54,25 @@ When picking a Time filter, Metabase will prompt you to pick a specific type of
Single Date and Date Range will provide a calendar widget, while the other options all provide slightly different dropdown interfaces for picking values. To get a widget that's just like the time filter in the query builder, choose All options.
### Location filters
## Time grouping parameter
![Time grouping](./images/time-grouping.png)
You can add a time grouping widget to a dashboard to change how charts are grouped by time. For example, you may want to look at the time series charts grouped by month by default, but give people the option to view the results by other groupings: by week, by quarter, and so on.
This widget doesn't filter data in the charts; the widget just changes the time granularity for any cards that have a datetime field connected to the widget.
You can group by:
- Minute (or minute of hour)
- Hour (or hour of day)
- Day (or day of week, month, or year)
- Week (or week of year)
- Month (or month of year)
- Quarter (or quarter of year)
- Year
## Location filters
There are four types of Location filters to choose from:
......@@ -59,11 +81,11 @@ There are four types of Location filters to choose from:
- ZIP or Postal Code
- Country
### ID filter
## ID filter
The ID filter provides a simple input box where you can type the ID of a user, order, etc.
### Number filter
## Number filter
You can choose from:
......@@ -73,7 +95,7 @@ You can choose from:
- Greater than or equal to
- Less than or equal to
### Text or category filter
## Text or category filter
A flexible filter type that will let you create either a dropdown menu or an input box to filter on any category field in your cards. Options include:
......@@ -84,9 +106,11 @@ A flexible filter type that will let you create either a dropdown menu or an inp
- **Starts with**. Match values that begin with the entered text.
- **Ends with**. Match values that end with the entered text.
## Connecting a filter to dashboard cards
## Connecting a filter or parameter widget to dashboard cards
Dashboard widgets apply across all [dashboard tabs](./introduction.md#dashboard-tabs), though they'll only be displayed when a tab has cards connected to the widget.
Dashboard filters apply across all [dashboard tabs](./introduction.md#dashboard-tabs), though for each filter you add, you'll need to tell Metabase which column the filter should update for each card.
For each widget that you add, you'll need to tell Metabase which column the filter should update for each card.
Click on a card's dropdown menu to select the field that you want the widget to filter on.
......@@ -96,7 +120,7 @@ Here we've wired up a Text filter to the "Event types" card, telling Metabase th
## Auto-connecting filters to cards
If there are other cards that also have the field you select, Metabase will automatically connect the filter to those cards too (including to relevant cards on other tabs). If you later add a card with the selected field, Metabase will also try to connect that filter to the new card.
If there are other cards that also have the field you select, Metabase will offer to automatically connect the filter to those cards too (including to relevant cards on other tabs). If you later add a card with the selected field, Metabase will also try to connect that filter to the new card.
To undo this auto-connecting of cards, click on the toast that pops up when Metabase auto-connects the cards, or manually disconnect the cards by clicking on the "X" next to the connected field.
......@@ -108,7 +132,7 @@ If you're trying to connect a filter to a card with a native/SQL questions, you'
You can even wire up filters to text cards, but only if [the text card includes a variable](./introduction.md#including-variables-in-text-cards).
## Requiring a filter
## Requiring a filter or parameter
You can tell Metabase to require a filter so that people _must_ filter the dashboard by a certain column on a card. If you require a filter, you'll also need to supply a default value for that filter.
......
docs/dashboards/images/add-filter.png

188 KiB | W: | H:

docs/dashboards/images/add-filter.png

193 KiB | W: | H:

docs/dashboards/images/add-filter.png
docs/dashboards/images/add-filter.png
docs/dashboards/images/add-filter.png
docs/dashboards/images/add-filter.png
  • 2-up
  • Swipe
  • Onion skin
docs/dashboards/images/filters.png

70.6 KiB | W: | H:

docs/dashboards/images/filters.png

133 KiB | W: | H:

docs/dashboards/images/filters.png
docs/dashboards/images/filters.png
docs/dashboards/images/filters.png
docs/dashboards/images/filters.png
  • 2-up
  • Swipe
  • Onion skin
docs/dashboards/images/time-grouping.png

139 KiB

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