Filters let you keep only the rows you care about: campaigns whose name contains a keyword, orders above a certain value, a specific country. They work the same way in every destination (Google Sheets, Looker Studio, Claude, and BigQuery).
How Filters Work
On most platforms, Detrics fetches your data first and then removes the rows that don’t match your filters. Because the filtering happens on the Detrics side, the rules below apply consistently regardless of the data source.
Some platforms have a native filtering module, and Detrics is connected to it: on Google Ads, Google Analytics 4, Meta Ads, and Shopify, your filters are translated into the platform’s own filtering language and applied at the source whenever possible. The results are the same; the query is just faster because the platform sends only the matching rows.
Native translation is used only when your filters map cleanly to what the platform supports. In particular, filter chains that mix AND and OR are always evaluated by Detrics itself, so the combining rules described below hold on every platform.
There are two kinds of filters:
- Dimension filters compare text values (campaign name, country, device)
- Metric filters compare numbers (spend, impressions, conversions)
Dimension Filter Operators
| Operator | What it does | Example |
|---|
| Contains | Keeps rows where the value includes your text | Contains "sale" matches “Summer sale 2026” |
| Does not Contain | Removes rows where the value includes your text | Does not Contain "test" removes “test campaign” |
| Equals | Keeps rows where the value matches your text exactly | Equals "US" matches “US” but not “USA” |
| Does not Equal | Removes rows where the value matches exactly | Does not Equal "Paused" |
| Regex Contains | Keeps rows that contain any of several texts, separated by | | Regex Contains "sale|promo|launch" |
| Regex Contains Exact | Keeps rows that exactly match any of several texts, separated by | | Regex Contains Exact "US|MX|AR" |
Matching is case-sensitive. Contains "SALE" will not match a campaign named “Summer Sale 2026”. Write the value with the exact casing your platform uses, or cover the variants with Regex Contains: sale|Sale|SALE.
About Regex Contains
Despite the name, Regex Contains does not accept full regular expression syntax. It accepts a list of plain texts separated by |, and keeps a row when the value contains any of them. Spaces around each text are ignored, and you can optionally wrap the whole list in parentheses: (sale|promo) works the same as sale|promo.
Regex syntax such as ^, $, .*, or character classes is treated as literal text, so ^Brand.* looks for a value that literally contains “^Brand.*”.
Regex Contains Exact uses the same | list, but the value must match one of the texts entirely instead of just containing it.
Google Ads is the one exception: when a Regex Contains filter is applied natively at the source, it supports full regular expression syntax and matches case-insensitively. If you need the same filter to behave identically across platforms, stick to the | list of plain texts.
Metric Filter Operators
| Operator | What it does |
|---|
| Greater Than | Keeps rows where the metric is above your value |
| Less Than | Keeps rows where the metric is below your value |
| Greater or Equal | Keeps rows at or above your value |
| Smaller or Equal | Keeps rows at or below your value |
| Does not Equal | Removes rows where the metric equals your value |
Metric values are compared as numbers. A row with an empty metric counts as 0, so Greater Than 0 is a handy way to remove empty rows.
Combining Filters
You can chain several filters with AND / OR:
- AND: the row must pass both conditions
- OR: the row must pass at least one
Conditions are evaluated strictly in order, from left to right. Each condition combines with the accumulated result of everything before it, and there is no grouping with parentheses. Note that this differs from SQL and spreadsheet formulas, where AND takes precedence over OR.
This means the order of your filters defines the grouping. Compare these two arrangements of the same three conditions on a campaign name:
| Filters in order | Evaluates as | Returns |
|---|
Contains "A" AND Contains "B" OR Contains "C" | (A and B) or C | Campaigns with both A and B, plus every campaign with C |
Contains "A" OR Contains "C" AND Contains "B" | (A or C) and B | Campaigns with A or C, but only if they also contain B |
To express “matches any of these keywords, and always meets this condition”, list the OR alternatives first and put the must-have condition last. For the OR part you can also use a single Regex Contains filter (A|C) instead of multiple OR cards, which keeps the chain simpler.
Filtering on Fields Not in Your Query
As a general rule, a filter references a field that is part of the query: if you filter on Campaign Name, Campaign Name should be one of your selected dimensions.
Three platforms also support dimensionless filtering, where you can filter on a dimension without selecting it:
- Google Analytics 4
- Meta Ads
- Shopify
On these platforms, Detrics fetches the filter field behind the scenes, applies your condition, and leaves it out of the final results. On every other platform, filtering on a field that isn’t in the query returns an error asking you to add the field as a dimension.
Dimensionless filters have a couple of extra limits: on Shopify they can’t mix AND and OR in the same query, and some operators or field combinations may be rejected depending on the platform. The error message always names the field or operator that needs adjusting.
Empty Values
- An empty or missing dimension is treated as empty text (
"")
- An empty or missing metric is treated as
0
- Boolean dimensions (true/false fields) are the one case-insensitive exception:
true, True, and TRUE all match