Filter data
The Infinity data source provides multiple ways to filter data depending on which parser you use. You can filter results using expressions, visual filters, or query language syntax.
Note
All filtering happens after retrieving the content from the source. For better performance, use filtering provided by the API when possible (for example, query parameters in the URL).
Filter methods by parser
Filter with the Backend parser
When using the Backend parser (JSONata or JQ), use the Filter expression field to filter rows. The expression must evaluate to true or false.
Filter expression syntax
Filter expressions support the following operators:
Filter with a single value variable
To filter based on a single-value template variable:
region == '${region}'This filters rows where the region field matches the selected variable value.
Filter with a multi-value variable
To filter based on a multi-value template variable, use the IN operator with the singlequote format:
region IN (${region:singlequote})This filters rows where the region field matches any of the selected values.
Exclude values (NOT IN)
To exclude multiple values, wrap the condition with !():
!(region IN (${region:singlequote}))Combine multiple conditions
You can combine conditions using && (AND) and || (OR):
region == 'US' && status == 'active'
price > 100 || featured == trueFilter with the Frontend parser
When using the Frontend parser with defined columns, you can use the visual filter editor. This provides a drop-down interface for selecting fields, operators, and values.
Available filter operators
The visual filter editor supports the following operators:
Note
The visual filter editor is only available when using the Frontend parser and when you have defined at least one column.
Filter with UQL
When using UQL (Unified Query Language), use the where clause to filter data.
Basic UQL filter
parse-json
| where "region" == 'US'
| summarize count("name") by "region"UQL with single-value variable
parse-json
| where "region" == '${region}'
| summarize count("name") by "region"UQL with multi-value variable
parse-json
| where "region" in (${region:singlequote})
| summarize count("name") by "region"UQL exclude values (NOT IN)
parse-json
| where "region" !in (${region:singlequote})
| summarize count("name") by "region"UQL with JSONata expressions
You can also use JSONata syntax within UQL for more complex filtering:
parse-json
| jsonata "$[region='${region}']"
| summarize count("name") by "region"For multi-value variables with JSONata:
parse-json
| jsonata "$[region in [${region:singlequote}]]"
| summarize count("name") by "region"To exclude values with JSONata:
parse-json
| jsonata "$[$not(region in [${region:singlequote}])]"
| summarize count("name") by "region"Use template variables in filters
Template variables make filters dynamic, allowing users to select values from dashboard drop-downs.
Variable formatting options
When using multi-value variables in filters, use the appropriate format option:
For more information about variable formatting, refer to Advanced variable format options.



