# Filters in the Compare Page

Filters can be written at the top of the compare page, which is accessible from the project detail page. Users write filters to select for only the rows they wish to visualize / inspect.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcIQVgwq34GflSD0WvZZbiNoZ5IHjuO7GAt8PYfC9Pn3VCedg1ewhgOnRmExmRt2uC9X_1Tqd5KEDt8M_-I71fUouHF4fuQOHgca3ZJfJzLF1MkUZzqfrQk6mqjFcfHv7MKrEhgfyzYtM1HIKivjtuXoBg?key=rITDctX4nVqKraPSKOD6NQ" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXft4jr7bYhMGA46NFWg93YBBC__q2PcLUGTWXcNRscZXd7c2Kp3PQkHwEYR8aCkfHPFhPeYc39ftnzG5bFiSkzhZJ8bBpDdjresX1ae4i-Smo0Sg7PvBNFpjJQ8EMLxTx_GO7M68RSa4GyhExFqn6gwUuM?key=rITDctX4nVqKraPSKOD6NQ" alt=""><figcaption></figcaption></figure>

Below is a list of DBNL defined functions that can be used in filter expressions:

<table><thead><tr><th width="241">function name</th><th width="106">aliases</th><th>description</th></tr></thead><tbody><tr><td>and</td><td><br></td><td>Logical AND operation of two or more boolean columns</td></tr><tr><td>or</td><td><br></td><td>Logical OR operation of two or more boolean columns</td></tr><tr><td>not</td><td><br></td><td>Logical NOT operation of a boolean column</td></tr><tr><td>less_than</td><td>['lt']</td><td>Computes the element-wise less than comparison of two columns. input1 &#x3C; input2</td></tr><tr><td>less_than_or_equal_to</td><td>['lte']</td><td>Computes the element-wise less than or equal to comparison of two columns. input1 &#x3C;= input2</td></tr><tr><td>greater_than</td><td>['gt']</td><td>Computes the element-wise greater than comparison of two columns. input1 > input2</td></tr><tr><td>greater_than_or_equal_to</td><td>['gte']</td><td>Computes the element-wise greater than or equal to comparison of two columns. input1 >= input2</td></tr><tr><td>equal_to</td><td>['eq']</td><td>Computes the element-wise greater than or equal to comparison of two columns</td></tr></tbody></table>

Here is an example of a more complicated filter that selects for rows that have their loc column equal to the string 'NY' and their respective churn\_score > 0.9:

```
and(gt({RUN}.churn_score, 0.9), equal_to({RUN}.loc, 'NY'))
```

{% hint style="warning" %}
Use single quotes `'` for filtering of string variables.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dbnl.com/v0.23.x/to-be-deleted/using-filters/filters-in-the-compare-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
