Skip to main content
You are viewing the documentation for Interana version 2. For documentation on the most recent version of Interana, go to


Scuba Docs

Advanced filter syntax reference

Neal Kaplan
This applies tov2.25

You can use advanced filters in the Query Builder to compare anything in Interana. You can create filters to compare not only columns to values, but also to compare columns to columns and metrics to metrics (or columns to metrics). 

Syntax rules

  • The filter expressions are case sensitive
  • Use backticks (`) to surround column names (`lastName`)
  • Use double quotes (“) to surround strings (“Johnson”)
  • You can use single or double equal signs (= or ==) as an equivalence operator

Filter syntax

Both Simple and Advanced filters support the following syntax:

Advanced filter syntax Simple filter option Advanced filter example Supported column types
=, == is one of (`location` = "London") int, string
!= is not one of (`location` != "London") int, string
is_in_cohort is in cohort (`userId` is_in_cohort “Registered for the site”) int
is_not_in_cohort is not in cohort (`userId` is_not_in_cohort “Registered for the site”) int
< is less than (<) (`itemsInSession` < 150) int
> is greater than (>) (`itemsInSession` > 25) int
<= is less than or equal to (<=) (`itemsInSession` <= 100) int
>= is greater than or equal to (>=) (`itemsInSession` <= 50) int
matches text contains (`location` matches “Lond”) string
startswith starts with (`location` startswith “L”) string
endswith ends with (`location` endswith “n”) string
contains set contains (`machineName` contains “xrydlt01”) string.set
excludes set excludes (`machineName` excludes “xrydlt01”) string.set

Filter statement conjunctions (link two or more filter statements)

Advanced filter syntax Simple filter option Advanced filter example
and Interana automatically uses and to combine multiple filters that use different parameters (for the selected column and/or filter syntax) (`page` = "Upgrade")and(`itemInSession` > 25)
or Interana automatically uses or to combine multiple filters that use the same column and filter syntax (`page` = "Upgrade")or(`page` = "Downgrade")
not not available not (`page` matches "Next")
and not not available (`itemInSession` > 25)and not(`page` = "Downgrade")
or not not available (`itemInSession` > 25)or not(`page` = "Downgrade")

Using "not" in filters

You can negate any filter by switching to Advanced and placing "not" before your expression. This means you can easily create an expression for "<text> does not contain".

For example, if you want to filter to "user.agent does not contain Chrome" you can start with a basic filter of "user.agent text contains Chrome," toggle to the Advanced Filter, then put a NOT in front of the expression:

NOT (`user.agent` matches "Chrome")

Multiple statements using And and Or

If you add multiple filter statements as Simple filters, Interana will automatically determine whether to link them with an and or an or statement. You can view these statements in the Advanced tab. 

Filters with the same parameters are linked with or:

(`firstName` startswith “L”) or (`firstName` startswith “N”)

Filters with different parameters are linked with and:

(`firstName` startswith “A”) and (`lastName` startswith “B”)

(`userId` > 0) and (`page` = “Upgrade”) 

For example, if you create the following simple filter: 

The corresponding advanced filter syntax will be:

(`page` = "Upgrade")and((`level` = "paid")or(`level` = "free"))