Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Filter Data which only contains specific word

zqlcancer
8 - Asteroid

Below is an example of my data. My request is to filter the data which cell only includes word "ok"(i.e. line 1,2,3). Is it possible?

 

Line

Remark

1

Ok

2

Ok/Ok

3

Ok/Ok/Ok

4

Ok/tax is wrong/ok

5

Tax not included

5 REPLIES 5
PhilipMannering
16 - Nebula
16 - Nebula

What about a custom filter with expression,

REGEX_Match([Remark], '(ok/?)+')
zqlcancer
8 - Asteroid

@PhilipMannering , thanks for reply, it worked. Is it possible to explain your expression? especially why do you use the bracket, plus sign and question mark?

PhilipMannering
16 - Nebula
16 - Nebula

Sure.

 

The ? means 0 or 1 of the preceding character. So /? matches a forward slash or no forward slash

The + means 1 or more. Since the stuff before is in brackets, it's 1 or more of "ok" or "ok/"

 

HenriHiebert88
6 - Meteoroid

Yes, it's possible. You can use a filter function or conditional formatting in Excel to filter or highlight the cells that contain only the word "Ok".

zqlcancer
8 - Asteroid

@PhilipMannering ,thanks for your reply. It helps a lot.

Labels