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

# Apply a filter to a single measure

> Add a filter to just one measure in a given query.

[All guides](https://docs.omni.co/guides.md)

Progress

%

Category

modeling

Last updated

December 2025

# Apply a filter to a single measure

Filtered measures allow you to apply a filter to a single measure in a given query. For example, filtered measures are equivalent to a SQL statement like:

```sql theme={null}
COUNT(DISTINCT
    CASE
      WHEN status = 'Complete' THEN order_id
      ELSE NULL
    END)
```

However, filtered measures have the added benefit of intelligent passing through the filter value when you drill.

## Option 1: Use the Create filtered measure workbook option

1. In a workbook query tab, create a query with a measure you want to filter.
2. Add a pivot on the dimension that contains the value you want to filter.
3. In the results table, right click on the measure you want to filter.
4. Select **Create filtered measure**.

![](https://mintcdn.com/omni-e7402367/Ueaby5Zd9SfduDZ-/guides/modeling/images/filtered-measure-option-1.gif?s=7a2a7fddfbb1303ed03650152edef554)

## Option 2: Create a duplicate measure or a quick aggregate

1. In a workbook query tab, create a query with a measure you want to filter.
2. Create a new measure. You can do this by either right clicking on the field and selecting **Aggregates** or by duplicating an existing measure.
3. In the field browser, right click on the measure you just created and select **Modeling > Edit**.
4. In the **Edit field** panel, click **Add filter** to apply a filter to the measure.

![](https://mintcdn.com/omni-e7402367/Ueaby5Zd9SfduDZ-/guides/modeling/images/filtered-measure-option-2.gif?s=a2adc67b9298193d9739d3403e5654a3)

## Option 3: Use the model IDE

You can also create filtered measures in the model IDE using [filter syntax](https://docs.omni.co/modeling/measures/parameters/filters.md):

```yaml theme={null}
order_items_count_status_complete:
  aggregate_type: count
  filters:
    status:
      is: Complete

margin_sum:
  sql: ${order_items.margin}
  label: Completed Order Margin Sum
  aggregate_type: sum
  filters:
    status:
      is: Complete
```


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