> ## Documentation Index
> Fetch the complete documentation index at: https://learn.kubit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Filters

> Narrow a Kubit report to the events that match conditions: filter operators, AND and OR logic, case sensitivity, field-to-field filters and dashboard filters.

Filters narrow a Kubit report to the events that match conditions you set. Apply them at the report level to limit which events the analysis includes. This page covers the parts of a filter, the operators, combining conditions, case sensitivity, comparing two fields, filter groups and dashboard filters.

## When to use

| Use case | Example |
| - | - |
| Limit to one segment | Only events where `country = "US"` |
| Exclude test traffic | Drop events where `status ≠ "test"` |
| Find slow or failing calls | Events where `duration > 5000` or `error_message exists` |
| Match a URL pattern | Events where `path matches "^/api/v[0-9]+"` |

## Filter structure

A filter condition has three parts.

| Part | What it is | Example |
| - | - | - |
| **Field** | The dimension or measure to filter on | `country`, `model_name`, `status_code` |
| **Operator** | How Kubit compares the field's value | Equal, Contains, Greater Than |
| **Value(s)** | The value or values to match | `"US"`, `5000` |

## Filter operators

| Operator | What it matches | Example |
| - | - | - |
| Equal | Exact match | `country = "US"` |
| Not Equal | Everything except an exact match | `status ≠ "test"` |
| Contains | Substring match | `name contains "checkout"` |
| Not Contains | Everything without the substring | `name not contains "internal"` |
| Starts With | Prefix match | `url starts with "/api"` |
| Ends With | Suffix match | `email ends with "@company.com"` |
| Greater Than | Numeric comparison | `duration > 5000` |
| Less Than | Numeric comparison | `response_time < 200` |
| Greater or Equal | Numeric comparison | `retry_count >= 3` |
| Less or Equal | Numeric comparison | `error_count <= 1` |
| Between | A range, inclusive | `age between 18 and 65` |
| Exists | The field is present (not null) | `error_message exists` |
| Is Empty | The field is null or empty | `referrer is empty` |
| Matches | A regex pattern | `path matches "^/api/v[0-9]+"` |

### MCP prompt examples

> "Show tool call count for the last 7 days where duration is greater than 5000 ms"

> "Count checkout events where the URL starts with /api, by day"

## Combine filters with AND and OR

You can join filter conditions with a logical operator.

| Operator | An event is included when | Use it to |
| - | - | - |
| **AND** | It meets every condition | Narrow the results with each condition |
| **OR** | It meets at least one condition | Include events that match any of several conditions |

### Filter groups

The **Event Filter** and the **Global Filter** each support up to **3** filter groups, joined with AND or OR. Each filter group works like a set of parentheses around its conditions.

## Case-sensitive filters

Text filters are case sensitive by default. A filter on `subscription_type = 'Premium'` only matches values with a capital P. If a column mixes cases, click the **Aa** button to turn case sensitivity off. The button is blue when case sensitivity is on and gray when it's off.

## Filter against another field

To filter on whether one column equals another, rather than on a fixed value, click the **V** button and select the column to compare against. For example, keep only events where column A equals column B.

## Dashboard filters

A dashboard has its own filters that apply to every report on it and override each report's own filter settings. Dashboard filters have an **Any** option, which report filters don't. **Any** resets a filter dimension without removing it. Kubit saves a dashboard's filters with the dashboard and applies them again when you reopen it.

See [Dashboards](https://learn.kubit.ai/product-analytics/dashboards.md) for the rest of the dashboard settings.

## Related

* [Group By and binning](https://learn.kubit.ai/product-analytics/reports/common/group-by-and-binning.md): split results instead of filtering them.
* [Dashboards](https://learn.kubit.ai/product-analytics/dashboards.md): where dashboard filters apply.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.