Overriding Parent Filters

In your workspace, you can apply data filters at the metric, report, and dashboard levels. Specified based on attributes and attribute values, these filters change the computed values displayed in your reports.

Filters are applied to the data based on an order of precedence, in which dashboard filters are given the highest priority, followed by report filters and then filters within metric definitions. For more information, see Filter Expressions.

In your metric definitions, you can specify overrides of the filters that have been specified in higher-level (parent) objects in your workspace.

A parent filter is any data filter applied to a workspace object from one of its parent objects. A parent object can be considered any report that contains the metric or another metric built on the metric.

  • For example, if your report filter is defined to be Channel = Twitter, then by default all metrics in the report are computed for data that matches Channel = Twitter. Similarly, if the dashboard filter is set to Date = June 2, 2014, then all metrics in the report calculated from data matching Date = June 2, 2014 and Channel = Twitter. However, other reports on the dashboard are only filtered by the date value.
  • If there is a dashboard filter and a report filter on two different attributes: data must match both filter conditions in order to appear in the report. In the MAQL query for the report, a logical AND is applied between the filters.
  • If the dashboard filter and report filter are on the same attribute: the dashboard filter overrides the report filter.

A metric’s parent filters can be specified in any report or dashboard containing the metric or in any metric in which the original metric is nested.

These filters are applied to a metric’s data before the computations has been executed.

In some cases, however, you may want to override parent filters or to specify which of these filters to apply from within your metric definitions. These report filter overrides can be an important method for maintaining control over the data that is displayed for a metric.

For example, suppose your Total_Employees metric should display a single, consistent value wherever it is used in the workspace. However, your data model may make it possible to filter this metric by attributes such as Region or Office_Location in metrics, report filters, and dashboard filters. By adding the WITHOUT PARENT FILTER keyword to the metric definition, you ensure that the Total_Employees metric returns a consistent value no matter where and how it is used in the workspace.

For more information, see PARENT Filters and Filtering with the HAVING Clause.

This section contains the following topics: