Alteryx Designer Desktop Discussions

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

Exclude specific item(s) from existing column into a new column

PamG
7 - Meteor

Hello,

 

I have a simple query but cannot do successfully after trying a few methods.

 

I have an existing column of data which is all good, however, I now need to create a new column with a couple of the existing items removed from it.

 

For example:

My ExistingColumn has all these items but now need a NewColumn to exclude eg the work Mango from it. 

PamG_0-1679074282462.png

 

Hope its an easy

Many thanks in advance.

Regards

 

 

4 REPLIES 4
FrederikE
13 - Pulsar

Hey @PamG,

 

You can just duplicate the column via a formula and then use Find&Replace with an Input/Text Input of a list of items that should be removed. 

Make sure all fields are string for F&R.

 

FrederikE_2-1679074872223.png

FrederikE_0-1679074858323.png

FrederikE_1-1679074864089.png

 

RobertOdera
13 - Pulsar

Hi @PamG 

 

try the below in a formula tool for NewColumn, where

IF !CONTAINS([ExistingColumn],"Mango")
THEN [ExistingColumn]
ELSE Null()
ENDIF.

 

RobertOdera_0-1679171561665.png

Cheers!

PamG
7 - Meteor

Hiya @RobertOdera

 

This is brilliant. Thanks so much for this, it worked brilliantly and a tad simpler too!

 

Thanks also @FrederikE

RobertOdera
13 - Pulsar

You're most welcome @PamG!

Labels