Filters let you include or exclude data when a certain condition is met. Use filters to focus on the data that best communicates the story you want to tell, and to make your reports more relevant to your audience.
This article is about setting up filter properties. Only editors can use this kind of filter. For filter controls, which can be used by report viewers, please see this article.
How filters work
Filters work by including or excluding records in your data that meet a set of conditions that you specify. Include filters retrieve only the records that match the conditions, while exclude filters retrieve only the records that DON'T match the conditions. Note that filters do not transform your data in any way. They simply reduce the amount of data displayed in the report.
Filters conditions consist of one or more clauses. Multiple clauses can be joined with "OR" logic (true if any conditions are met), "AND" logic (true if all conditions are met), or both.
To specify a filter condition, chose a dimension (e.g., Country) or metric (e.g., Price), an operator (e.g., Equals or Greater than), and type in a comparison value (e.g. England, or 2500).
What you can filter
You can apply filters to the following components:
- Charts. For example, you can display a pie chart of new versus returning users in your biggest markets with a filter including Country IN "
- Filter controls. For example, you can let your viewers select from a list of best selling products on Quantity Sold Greater than (>)
- Groups. For example, you can group 2 sets of charts and filter on Device Category to show website traffic in one set, and on the other to show mobile traffic.
- Pages. Page-level filters apply to every chart on that page. For example, you can dedicate page 1 of your Google Analytics report to mobile app traffic, and page 2 to desktop traffic by filtering on the Device Category dimension.
- Reports. Every chart in the report is subject to the filter. For example, you can create a report that focuses on your best customers by setting the report-level filter property to Lifetime Value Greater than or equal to 10,000.
Filters and data sources
When you create a filter, that filter gets assigned to a data source. If you create the filter by adding it to a component, that data source is the one in use by the component. If you create the filter using the filter manager, you can select any of the data sources currently added to the report.
Reusing a filter on a component that uses a different data source can render the filter invalid. That's because the dimensions and/or metrics used by the filter may not exist in the new data source.
The same thing can happen if you copy a chart or control to a report that uses a different data source, or if simply change the data source in use by a filter by editing it in the filter manager.
Invalid filters display an error on the chart or control, and a warning icon on the filter. You can fix this by editing the filter and selecting new dimensions or metrics, or by deleting the filter.
Filters can be inherited, meaning filters on higher level components apply to the components beneath them. The order of inheritance is:
Report level > page level > chart/control level
In order for a lower-level (child) component to inherit filters from a higher-level (parent) component, the dimensions and metrics used in the parent's filters must exist in the child component's data source. If they don't, then inheritance is turned off for the child component.
You can turn off inheritance explicitly by using the toggle in the Filter section of the DATA properties panel for a selected component. For example, you can tell a chart not to inherit a page level filter property, or a page not to inherit the report level one.
Multiple filters on a component
A component can have multiple filters. When this is the case, each filter is treated like an AND clause. This means that only the data rows that meet all of the conditions in the filter will be affected.
Limitations of filters
If you need more OR clauses, consider using the IN option instead.
- Report-level filters only apply to components using the default data source. If you include charts that use a different data source, you'll need to create a chart-level filter for that chart.
- A single component can have a maximum of 75 filters clauses.
- A single filter can have a maximum of 10 OR clauses.
- Metrics and dimensions cannot be mixed in an OR clause. This is due to how dimensions and metrics are aggregated.
- If you change a field in a data source from a metric to dimension or vice versa, any filters using that field are disabled.