Skip to main content
Build your filters faster by starting in the workbook! Add a filter to a query, save it as a query view, and open the query view editor to check out the underlying YAML. This can help you get the right structure and ensure the results are correct.
Omni’s filter syntax is built to mirror how filtering works in the Omni app, whether you’re in a workbook or a dashboard. Use the following tabs to see how filers are defined in Omni YAML:
Use always_where_filters and default_filters to add filters to topics. For example:
Topic default_filters
default_filters:
  users.status:
    is: active

Operators

Operators allow you to specify the type of filter you want to apply. Operators consist of a string, appended with a colon (:): <operator>:. Filter values should follow the colon. For example:
day_of_week: <filter_value>
less_than: <filter_value>
contains: <filter_value>

Types

Omni supports several types of operators, such as conditional, time, numeric, and text. Refer to the Filter operators reference for a complete list of operators.

Negation

Prefix a filter operator with not_ to create a negation. For example, day_of_week would become not_day_of_week.
The not_ prefix isn’t compatible with the following operators:

Filter values

Include filter values after the operator and the colon. Values should be unquoted; quotes will be removed upon saving.
Filter values should be unquoted
starts_with: Blob

Strings & dates

Provide strings and dates as unquoted values:
String value
contains: Blob
Date value
before: 2025-01-01

Booleans

Omni supports both two-state (true / false) and three-state (true / false / null) boolean logic. The special boolean argument falsey represents both false and null and can be used in filters like any other field value.
Counts if error = false or null
non_error_count:
  aggregate_type: count
  filters:
    is_error:
      is: falsey
Count if error = false
non_error_count:
  aggregate_type: count
  filters:
    is_error:
      is: false

Arrays / lists

Arrays are constructed using square brackets ([]). Add the filter values inside the brackets, for example:
Array of numbers
[ 1, 2, 3 ]
Array of strings
[ California, Oregon, Washington ]