Filter Pipeline Step Example Scenarios

Data Pipeline

The filter rows data pipeline step can quickly filter your data using multiple columns and methods. The examples below demonstrate the flexibility of this tool to help you visualize the data you need to see to make informed decisions.

Comparing Columns

If you only want to return rows where one column has a certain relationship (greater than, less than, etc.) to another column, you can use the Filter Rows step to compare these columns.

In the example below, we want to return only rows where our monthly Adwords sales are higher than our monthly Print sales. Here’s the chart we’re working with:

Compare columns in filter Pipeline step

We’ll add a Filter Rows step in the Pipeline (Add Step > Filter Rows) with the following settings:

Compare step 1

As you can see, rows where Print sales were greater than Adwords sales are removed.

Compare filter Pipeline steps 2

Filtering Specific Days of the Week

Say you want to filter out weekends or your business days comprise of a Monday - Saturday week or a Monday - Thursday week. How do we filter these other days of the week out?

This can be done in our data pipeline. Our data pipeline uses SQLite so we can employ functions that SQLite uses. Our first step is our query. We will need to select “Day of” as our time bucket for our date field. Let’s use this query as an example:

Create a chart to filter by days of the week

Our next step will be to add an “Add Column” step in the pipeline. We will call this column “DOW” and select to use a custom formula: strftime(‘%w’, “Day of Created Date”)

Add a column in the Pipeline

Once we do that we have our days of the week listed out. Sunday = 0 to Saturday = 6. We can now filter out 0 and 6 using a filter row step. We’ll exclude rows matching ALL conditions where DOW is one of 0 and 6:

Filter rows in the Pipeline

And that’s it! We’ve now excluded all the Saturday and Sunday data.


Related Data Pipeline Help Articles

See more