Skip to main content
A dashboard filter sits at the top of the dashboard and changes the data in the tiles below it. One filter can drive every chart on the dashboard, or just the tiles you choose, and viewers can adjust it without editing anything. Two kinds exist: temporary filters, which only you see, and saved filters, which everyone who opens the dashboard sees. Beyond that, this page covers SQL runner charts, how dashboard filters override chart filters, required filters, empty defaults, sharing with overrides, which tiles a filter hit, value autocomplete, and filtering from the URL. For filter types and operators, see the filters reference. For filtering a single chart as you build it, see filtering in the Explore view.

Temporary filters

A temporary filter applies only to your session: you won’t change the dashboard for anyone else who comes to look at it. To make a filter stick for everyone, use a saved filter.
To restrict access to temporary filters, hide the Add filters button on a dashboard. In edit mode, toggle the eye icon next to the Add filters dropdown. When hidden, viewers are restricted to the filters set up in dashboard edit mode.
  1. Open your dashboard.
  2. Click Add filter, then specify the field to filter on and the value to filter by.
Adding a new filter to a dashboard
  1. To adjust which tiles the filter applies to, open the Tiles tab.
The Tiles tab of a dashboard filter
You can remove the filter from a tile, or change which field it’s applied to on that tile.
Changing the field a filter applies to on one tile
  1. Your filters appear at the top of the dashboard.
Applied filters shown at the top of a dashboard
Values for temporary and overridden saved filters are reverted when entering dashboard edit mode.
You can also create a temporary filter by clicking a value in a chart tile, which is called cross-filtering.

Saved filters

A saved filter is part of the dashboard: anyone who opens it sees the filter applied.
  1. Open your dashboard.
  2. Make sure you’re in edit mode — if you’re not, you’ll see the Edit dashboard button.
The Edit dashboard button
  1. Click Add filter, then specify the dimension or metric to filter on.
Choosing a field for a saved dashboard filter
  1. Leave the value blank, or specify one.
Leaving the value blank applies no filter to the tiles, and gives viewers a control they can fill in to tailor results to their own needs.
A dashboard filter saved with no default value
To specify a value, toggle Default value so the filter applies to the tiles.
Setting a default value on a dashboard filter
  1. To adjust which tiles the filter applies to, open the Tiles tab.
The Tiles tab listing every tile the filter can apply to
Here too you can remove the filter from a tile, or change which field it applies to on that tile.
Changing the field a saved filter applies to on one tile
  1. Click Apply, and the filter appears at the top of your dashboard.
A dashboard filter applied but not yet saved
  1. Once you have all the filters you want, hit Save.
Saving a dashboard with its new filters
Now anyone who opens the dashboard sees your saved filters applied.
A saved dashboard filter as viewers see it
Viewers can still adjust the values by clicking the filter, which lets them cut the data their own way without changing the dashboard.
A viewer changing the value of a saved filter
To add saved filters to a dashboard, you must be an editor or an admin for your project.

Filtering charts created in the SQL runner

Dashboard filters apply to SQL runner charts as well as charts from the Explore view. How you create them depends on what’s on the dashboard. On a dashboard with both Explore and SQL runner charts, create filters exactly as above — choose a field and create the filter. Then, in the Chart tiles tab, apply the filter to a SQL chart tile and choose the column it should apply to. On a dashboard with only SQL runner tiles, filters work from columns rather than semantic fields:
  1. Choose a column from the list of all columns available across all charts.
  2. Choose a filter label to give the filter a recognizable name.
  3. Choose the filter operator and values as you would for any other filter.
The filter is applied to every column on the dashboard with the same name as the filtered column. In the Chart tiles tab of the filter dropdown you can pick exactly which tiles and columns it applies to instead. As with Explore-chart filters, filters only apply to dimensions — in this case, non-aggregated columns.

How dashboard filters interact with chart filters

Dashboard filters override filters applied in a saved chart on the same field. For example, a chart for Sales in Asia is filtered to country is China, India, Japan. On the dashboard you add a filter country is India. The saved chart’s filter is removed and the dashboard filter applies instead, so the tile is filtered to country is India. Dates work the same way. If the saved chart includes only orders completed on or after April 3rd 2024, and you add a dashboard filter for orders completed on or after August 1st 2024, the dashboard filter wins and the tile shows orders completed on or after August 1st 2024. This carries into exploring:
  • Explore from here on a dashboard tile keeps the filters you saw on the dashboard. Filters overridden in the dashboard stay overridden; filters the dashboard didn’t touch are the same as in the original chart.
  • Edit on the chart instead shows the original chart filters.

Required filters and filter requirement groups

Dashboard filters can be marked as required, so the dashboard won’t load any data until a viewer picks a value. You can also combine several filters into a requirement group: viewers must set at least one of them, but any will do. Take a Sales overview dashboard that queries all historic orders, where loading it unfiltered is slow and expensive. We want viewers to always pick a Payment method, plus at least one of Order status or Order date, before any queries run.

Marking a single filter as required

While editing the dashboard, open the Payment method filter’s popover and switch on the Required toggle. Required filters must start empty, so the toggle can’t be combined with a default value.
A dashboard filter popover in edit mode with the Required toggle switched on for the Payment method filter

Combining filters into a requirement group

The “Order status or Order date” half of the example needs a requirement group. Open the Filter rules popover next to the filter bar, where every rule is managed in one place:
  1. Click Add another rule, pick Order status, then add Order date to the same rule. One filter makes a plain required filter; more make an “at least one of” group. Filters with a default value, or already in another rule, can’t be picked.
  2. Optionally, write a Note for viewers explaining why the filters are required. Ours says: “Pick a payment method, plus an order status or date range, to keep this dashboard fast.”
  3. Click Save in the popover, then save the dashboard.
The Filter rules popover on the Sales overview dashboard, showing a required Payment method filter and an at-least-one-of group with Order status and Order date
Filters that are part of a rule are marked with an asterisk in the filter bar, and the Filter rules button shows how many rules the dashboard has.

What viewers see

While any rule is unmet, chart tiles stay locked. The dashboard shows a guided setup card with a picker for each filter and your note as its subtitle. On the example dashboard, viewers get one picker for Payment method, an “at least one of” section for Order status and Order date, and a progress indicator showing how many rules are still unmet:
The guided setup card on the Sales overview dashboard, prompting viewers to set Payment method plus at least one of Order status or Order date, with locked tiles behind it
Everything loads the moment the rules are met, and locks again if a viewer clears a value a rule needed. Viewers can also dismiss the card and use the filter bar instead. A rule counts as met when one of its filters has a value or uses an operator that needs none (is null, is not null, in the current, not in the current, in all periods to date). On dashboards with tabs, a rule only locks the tabs its filters apply to.

Required filters in dashboards-as-code

Here’s the same example in dashboard YAML: a required filter has required: true, filters sharing a requiredGroupId form an “at least one of” group, and the viewer note lives on the dashboard config as requiredFiltersNote.

Empty default dashboard filters

You can save a dashboard filter that is active but has no value picked yet — for example a country is filter with no country selected. This is an “unset default”: a filter control that appears in the dashboard filter bar so viewers can fill it in, without pre-committing to a value. Empty non-required filters behave like this:
  • They render in the filter bar as is any value.
  • They do not override chart-level filters on the same field. If a saved chart is filtered to country is India and the dashboard has an empty country filter, tiles keep the India filter until a viewer picks a value in the dashboard. As soon as a viewer selects a value, normal dashboard-overrides-chart behavior resumes.
  • They survive lightdash upload and are not flagged by lightdash lint — an empty active filter in dashboard YAML is a valid configuration.
Value-less relative-date operators (in the current, not in the current) are not treated as empty, because they get their period from a unit-of-time setting rather than a value. They apply to tiles like any other configured filter. To strip a chart-level filter from a tile, mark the dashboard filter as required, give it an explicit default value, or remove the filter from the saved chart. An empty dashboard filter won’t do it.

Sharing a dashboard with filter overrides

To share a dashboard with custom filters applied, you have to be in view mode. From there, either apply temporary filters and share the link with those filters applied, or save the filter changes for everybody and share the link with the new defaults. The rules for sharing dashboards with filters applied:
  • When adding a temporary filter in view mode, you can change the filter’s values — field, value, operator, and which tiles it applies to — but not the filter type, so a temporary filter can’t become a saved filter.
  • When overriding a saved filter in view mode, you can only change the value and operator; the field and tile configuration stay as they are.
  • In edit mode, when you change a saved filter to override its default value, the ‘override’ status is removed once you click Apply.
The same behavior applies when exporting dashboards or sending them to email or Slack in scheduled deliveries.

Seeing which tiles have filters applied

A tile with a filter applied shows the text dashboard filter applied. Hover over it to see which filters were applied to that tile.
A dashboard tile showing the dashboard filter applied label

Filter value autocomplete

When determining possible values for a dashboard filter, Lightdash takes into account all relevant filters, including those applied to fields from joined tables. Take these payments, orders, and customers models:
Following this example:
  • Filtering on a field from the payments model considers filters applied to fields from the payments, orders, and customers models.
  • Filtering on a field from the orders model considers filters applied to fields from the orders and customers models.
  • Filtering on a field from the customers model considers filters applied to fields from the customers model.

Filtering a dashboard from the URL

A dashboard URL can carry values for its saved filters, so a link opens the dashboard already filtered. You can set up a dimension so that clicking a value sends the reader to a dashboard filtered by what they clicked — a sales dashboard listing your most profitable partners, for instance, where clicking a partner name opens a second dashboard showing that partner’s KPIs. Here’s what it looks like once it’s set up:
And here’s the setup:
  1. Open the dashboard you want to filter dynamically.
  2. Add a value to the filter you want to drive from the URL.
  3. Copy the URL shown after applying the filter. It looks like this:
A dashboard URL containing an encoded filters parameter
The ?filters= key in the URL is followed by a URL-encoded JSON object. To read it, run it through a URL decoder.
  1. Replace the filter value you chose in step 2 with ${ value.formatted | url_encode } to make it dynamic. In the example, the value is Plant+Paradise (highlighted in the image).
  2. Paste that URL into the YAML file for the model you’re working in. See an example in our demo project.