Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

IF Statement

Tommaso83
Alteryx Alumni (Retired)

Morning awesome Alteryx community

 

I've got onequestion

 

What is the formula to use for the following scenario?

 

If title contains "trainee" or "assistant" or "contractor" then remove entire Excel row

 

Thanks in advance for your help

7 REPLIES 7
fmvizcaino
17 - Castor
17 - Castor

Hi @Tommaso83,

 

Use a filter tool with the following custom filter.

 

Contains(title,'trainee') or Contains(title,'assistant') or Contains(title,'contractor') 

 Your F anchor will remove all unwanted rows.

 

Best,

Fernando V.

grazitti_sapna
17 - Castor

Hi @Tommaso83 ,

 

As far as I am familiar with the Alteryx there is no such way of deleting the row or a column directly in alteryx but you can simply use filter tool to get the desired output. Here is the formula that you can use in the filter tool by changing its configuration to Custom.
Contains([Title], "Trainee") or
Contains([Title], "Assistant") or
Contains([Title], "Contractor")

 

I hope this helps!

 


@Tommaso83 wrote:

Morning awesome Alteryx community

 

I've got onequestion

 

What is the formula to use for the following scenario?

 

If title contains "trainee" or "assistant" or "contractor" then remove entire Excel row

 

Thanks in advance for your help


 

Sapna Gupta
Tommaso83
Alteryx Alumni (Retired)

Thank you!!!

 

One more question:

 

How to write filter expression that removes anyone which last name contains only 1 letter or 1 letter with a dot (ex. A or A.)?

 

Thanks

fmvizcaino
17 - Castor
17 - Castor

Hi @Tommaso83 ,

 

You can use the regex_match function with a filter tool as well.

!REGEX_Match([lastname], '\w\.{0,1}')

 

\w = a word character = [a-zA-Z0-9]

\. = literal dot

{0,1} = 0 or 1 occurences of the previous character (dot)

 

Best,

Fernando Vizcaino

Tommaso83
Alteryx Alumni (Retired)

Thanks @fmvizcaino 

 

Your reply is a bit too complicated for me so not sure how to do this in Alteryx 😉

 

Any chance you can explain this further or let me know steps to achieve the outcome I'm looking for?

Thanks

fmvizcaino
17 - Castor
17 - Castor

Hi @Tommaso83 ,

 

Sorry for not explaining clearly. 

I'm going to attach an example showing how.

 

fmvizcaino_0-1590744640339.png

 

Best,

Fernando Vizcaino

 

Tommaso83
Alteryx Alumni (Retired)

That was brilliant @fmvizcaino 

 

It worked perfectly!!!

Thank you for your help 😉

Labels