Overview

Filters allow report consumers to explore analysis on their own without having to modify the underlying query or report logic. Filters are applied to a report after all the SQL has executed, so they’re fast and don’t require the report to be re-run when they’re applied. Mode reports offer various types of filters that you can add at either the report or the individual visualization level:

  • Date range
  • Number range
  • Multi-select
  • Single-select

When you add a filter to a report or visualization, Mode will choose the appropriate filter type based on the type of data that is being filtered. You can change the filter type by clicking on the settings icon.

Report filters

Report filters apply to all built-in charts and visualizations included in a report. Using filters or parameters, you can turn any static report into an instant BI tool.

A report must be run before report filters can be applied. Only users with edit access to the report can create report filters, but all report viewers can use filters in the report view.

Add a report filter

NOTE
If your report includes queries with duplicate column names, applying a corresponding filter will filter all columns of that name.

  1. In the Report Builder, click Add Filter.
  2. You’ll see a list of all columns in all queries in your report. Select one to filter and click Add.
  3. The report filter panel will appear on the right side of the Report Builder, including the filter components, Set Default option, and Filter Settings.
  4. To adjust the settings on a particular component, hover over the component and click the Settings icon. In settings, you can change the filter type, update the position of each component, include null values, reset the report filter, and delete the component.
  5. Click Add Filter to include additional components to the filter panel.
  6. Once your report filters are set up, click Apply.
  7. To set a custom default range on a report filter, click Set as Default.
  8. Close the report filter panel by clicking the Filter icon.

Using report filters

  1. Click the Filter icon in the Report View, located on the right side of the header.
  2. Choose your filters and click Apply.
  3. All relevant visualizations will update to reflect the new filter configuration.

While a report editor can set default values for the filters in a report, any changes to those values by report viewers will not persist from session to session or for other viewers.

Report filters vs. parameters

Filters and parameters can both add interactivity to reports, but they serve different purposes depending on your needs. Reports can have both filters and parameters.

When using parameters, report viewers are essentially modifying the data that gets loaded into a report by modifying the underlying query; this requires re-running the report’s queries. Analysts need to write their parameter fields directly into their queries. Report filters, on the other hand, impact the data once it’s in the report (by narrowing down the results) and don’t impact how queries are run. As a result, they’re faster to add and only require a few clicks in the Report Builder.

In most cases, you’ll want to use report filters instead of parameters because they’re faster to build and faster to use, making it easier for viewers to quickly iterate through ideas. When your data set is massive (like an event stream), a parameter can be used to load a reasonable amount of data into the report.

Visualization filters

While report filters affect all visualizations in a report, visualization filters are applied only to a specific visualization.

For example, say there is one query in the report which powers both a line chart that visualizes sales trends over time, and a pie chart that visualizes the breakdown of sales per region. By adding the column sell_date as a report filter and excluding the year 2015, both charts will update with data from the excluded year.

Using the same query, if we want the line chart to reflect data from 2016 and 2017, while the pie chart shows data from all years, we’ll need to apply a visualization filter to the line chart instead.

Adding a visualization filter

Any column returned by queries can be added to a chart as a visualization filter. These filters can be applied to: bar, grouped bar, line, line + bar, area, 100% area, scatter, pie, and donut charts. To create a visualization filter:

  1. Select a chart type.
  2. In the chart settings, drag and drop a measure or dimension into the Filters drop zone.
  3. A moveable window will appear with the filter selections. Select the desired filter and click Apply to see the selection reflected on the chart. Use Reset to return to the last applied state.
  4. When ready, click OK to apply the visualization filter.
  5. To edit or remove a visualization filter, click the down arrow to access the context menu.

Using visualization filters in the report view

Report viewers can enter the expanded view for an individual visualization to explore the data behind it in depth:

  1. In the top-right corner of a visualization in the report view, click on the rocket icon to enter the expanded view.
  2. Drag and drop items into the Filter drop zone. To learn more about exploring data visually, read the doc.
  3. Press the escape key or click on the collapse icon to close the expanded view and return to the report.

No changes made by viewers in the expanded view will permanently affect the underlying report, nor will they persist from session to session.

FAQs

How are columns grouped in report filters?

Columns with the same name (and datatype) across multiple queries are automatically grouped into a single field. This will allow filtering across the entire report and the corresponding visualizations. To disassociate the columns with the same name, simply rename them using an alias in the query.

What happens if a column name is changed?

When a column is re-named, the report filter will no longer effect the column. However, if the column name is reverted, the filter will work again as long as the association between the filter and the query-column is not removed.

What happens to a report filter when a query gets deleted?

If the query that a report filter is associated with gets deleted, the report filter will continue to exist but will not have any impact on the data in the report. You can delete the report filter from the settings dropdown.

Do report filters work with embeds?

Yes, report filters work with all embed types, including White-Label Embeds.

Do report filters apply to Notebook output cell results or custom HTML?

Report filters currently do not affect Notebook output cells or custom HTML in reports.

Last updated May 17, 2018