Skip to main content
The Filter tool is one of the most used tool in any data analytics process. The Filter tool is designed to selectively pass through data that meets one or more conditions. In other words, you make a rule that each row has to fulfill and in doing so the output of your Filter tool will typically be a smaller dataset measured by the number of rows. You can use it to remove or keep null values, keep rows where an amount column is larger than a value or remove rows where a text column does not equal a certain requirement. The Filter tool outputs two anchors. That means you can easily access the rows that pass through the filter and the rows that don’t.

Configuration

You can use the Filter tool for simple operation but it can also be set up to handle more complex conditions. For each condtion you’ll add, you need to configure the following:
1

Select column

Select the column you want to filter by. This column will be used as the foundation for your condition.
2

Select operation

Select the operation that you want to filter your column by. Selecting the column determines which operations are available.
3

Enter syntax

This input support syntax, column references and parameters.
Enter the syntax that you want to filter with. See our Syntax page for more information. If you input raw text (like “Hello World”) you need to wrap it in double-quotes. To get the TRUE value of a boolean use 1 - and 0 for FALSE.
In addition to the above, there are a number of other options that you can configure:
  1. Convert an outer condition to a group condition. This is useful if you want to group multiple conditions together.
  2. Switch between AND and OR clauses for the outer conditions.
  3. Inside a group condition, you can also switch between AND and OR clauses for the group conditions.
  4. Add a group condition. This is useful if you want to group multiple conditions together.
  5. Remove a group condition. This is useful if you want to remove a group condition.
  6. Add an outer condtion. This is useful if you want to add a condition to the outer conditions.

Example: Keeping null values

In this example, we want to keep the rows where the column is null. We simply select the “is null” operation and leave the syntax empty.

Example: Filtering with contains in a Text column

In this example, we want to keep the rows where the text_col column contains the text “1”. Notice the double quotes around the text “1”.

Example: Creating a date range using a dynamic date

In this example, we only want to keep transactions that occur after a fixed date but before the current date. We use the Today constants in the syntax input and use two outer conditions to create a date range.

Example: Filtering Boolean columns

In this example, we want to keep the rows where the boolean_col column is true. Notice how select the “is true” operation and leave the syntax empty.

Example: Creating nested conditions

In this example, we want to keep the rows nulls_col is null or where int_col is larger than 500 and where float_col is less than 0.3. Note that the nested group condition must both be true (because of the AND clause) OR the first condition must be true (because of the OR clause).

Example: Advanced syntax

In this example, we want to keep all rows where datetime_col is equal to today’s date minus 2 years truncated to the first day of the year.