Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Cloud Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Cloud.
SOLVED

How do I filter rows based on multiple text strings across all columns without having to list each column

I want to filter all rows that contain either the text 'svc' or 'service' in any column

1 REPLY 1
Trifacta_Alumni
Alteryx Alumni (Retired)

Hi @Gavin Till?,

 

You can accomplish this by creating a temporary column that merges the values contained in all of your columns, and then creating a filter that deletes any rows where the merged column contains "svc" or "service". Here are the steps:

 

1. Click the "Merge columns" icon from the transformer toolbar.

 

2. On the right side of the screen, configure the "Merge columns" step. Under the "Columns" field, select the option that reads "All". You can enter any delimiter in the "Separator" field; in the image below, I chose to separate the values with a space.

After adding this transformation to your recipe, you will end up with a single column that contains the values from all of the other columns in your dataset.

 

3. Create a "Filter rows" transformation. In the "Condition" field, choose "Custom formula". You can use the MATCHES function to test whether the values in your output column contain a specific value. In your example, you can use the following formula:

MATCHES([merged_columns], `svc|service`, false)

In the image below, I have chosen to delete rows where the values "svc" or "service" are present in my merged column.

 

Hope this helps! If it does, please mark the answer as "Best" so that other users know your question has been resolved.