Skip to main content

 

Interana Docs

Calculate measures and filters with the expression builder

When you're building an Interana query, whenever you are selecting a property, you can instead create a mathematical expression and use it in your query or property definition, for example in the following places:

  • Calculate

    select_functions.png

  • Show
  • Filtered to - Use the expression builder to filter events at the start of a query using an arbitrary expression containing ANDs, ORs, or NOTs. These filters are sometimes referred to as advanced filters. The filter expression can include your event data or your lookup table data.
    adv_filter_4x.png

To access the expression builder, type an equals sign. Tips for using the expression builder are as follows:

  • Start typing to see function suggestions.
  • Type a left bracket [ to see property suggestions.
  • You can also type numbers that are not suggested.
  • After selecting a function, type to see suggested values (for example, after typing MATCHES).
  • After selecting a function, you can type a value that is not suggested (for example, in an expression that uses STARTS_WITH).
  • After selecting a function, click the function name to view in-product help for the function.
    seconds_between_help.png

Expression builder syntax

The expression builder uses standard JavaScript syntax for Booleans, as follows:

Boolean value Syntax
OR II
AND &&
NOT !

The expression builder supports generic matches. For example:

  • =MATCHES([action], “like”, “love”)
  • =DOES_NOT_MATCH([action], “like”, “love”)
  • =IS_EMPTY([action])
  • =IS_NOT_EMPTY([action])

Date math functions

Several relative time functions and calendar-aware functions are available. In addition, several existing functions are calculated based on the time zone set on your Interana cluster. That is, these functions use a per-cluster time zone setting that is directly viewable and configurable only by contacting customer support or your technical account manager. If your cluster is configured to use UTC, the behavior of these functions won't change. But if it's configured to use some other time zone, these functions honor that time zone.

  • The calendar-aware (and time-zone-aware) functions are as follows:
    • DAY_OF_WEEK
    • DAY_OF_MONTH

    • HOUR_OF_DAY
    • MINUTE_OF_HOUR
    • MONTH_OF_YEAR

    • ROUND_TO_YEAR

    • ROUND_TO_MONTH

    • ROUND_TO_DAY

    • ROUND_TO_HOUR

    • ROUND_TO_MINUTE

    • ROUND_TO_SECOND

    • SECOND_OF_MINUTE

  • The timestamp difference functions (which do not use the cluster time zone setting) are as follows:
    • SECONDS_BETWEEN

    • MINUTES_BETWEEN

    • HOURS_BETWEEN

    • DAYS_BETWEEN

    • WEEKS_BETWEEN

  • The object filter in the expression builder supports string functions, including the following:
    • STARTS_WITH
    • DOES_NOT_START_WITH
    • ENDS_WITH
    • DOES_NOT_END_WITH
    • CONTAINS
    • DOES_NOT_CONTAIN
    • MATCHES_REGEX

Select a function and then click the function name to see in-product help.

  • Was this article helpful?