home User Guide Getting Started Help Center Documentation Community Training Certification
menu
close
settings
Looker keyboard_arrow_down
language keyboard_arrow_down
English
Français
Deutsch
日本語
search
print
matches_filter

keyboard_arrow_leftBack to Functions and Operators

The matches_filter function can be used in custom filters and custom fields to determine whether the value of a field matches a filter expression.

Syntax

matches_filter(field, `filter expression`)

The matches_filter function applies the filter expression to the field and returns Yes if the value in the field matches the filter expression or No if it does not.

Examples

This example returns Yes in a custom field if the invoice date is less than 30 days old:

matches_filter(${billing.invoice_date}, `30 days`)

Use the if function with matches_filter to return different values. The next example shows syntax of a custom field that returns “Late” if the invoice date is over 30 days old:

if(matches_filter(${billing.invoice_date}, `30 days`), "Current", "Late")

Things to know

The string that defines the filter expression must be enclosed in backtick (`) characters.

Top