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 Desktop Discussions

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

Unique

Lucasvital
7 - Meteor

Hi,

 

I have a list of 400 names that can be non-exclusively A, B, C or D. So:

NamesCategory
Name 1A
Name 2A
Name 2B
Name 2D
Name 3B
Name 4C
Name 4D
Name 5D
Name 6A
Name 6D

 

I want select/filter a list of all names that contains only C and D... Don't Contain A, or B. In the example above would be Names 4 and 5. I am basically looking for a filter function with more than two criterias (e.g. Contains C OR Contains D AND does not contain A and B).

 

Any suggestion?

3 REPLIES 3
Thableaus
17 - Castor
17 - Castor

Hi @Lucasvital 

 

I'd do this way

 

UniqueUsingJoin.PNG

 

- Create a Flag Field using an IF function - IF Category IN ("A", "B") THEN 1 ELSE 0 ENDIF

 

- Filter all records flagged with 1

 

- Use a Join Tool to join the True Results with the original dataset by Names Field.

Whatever comes in the R anchor (that means, every name that doesn't have a Flag 1) would be your final answer.

 

WF attached.


Cheers,

TonyA
Alteryx Alumni (Retired)

I would make one minor tweak:

2019-10-25_18-19-32.png

danilang
19 - Altair
19 - Altair

Hi @Lucasvital 

 

Here's a completely different way to do it

 

w.png

Concatenate the categories by name and then apply a multipart filter

 

Contains([Concat_Category],"C") or Contains([Concat_Category],"D") and 
!(Contains([Concat_Category],"A") or Contains([Concat_Category],"B"))

 

 

resulting in 

r.png

 

Also, this is just a hunch, but is your input data is already some kind of concatenated format and did you parse this input to rows to generate the table that you show in your post above?  If that's the case, just use the filter directly on your input.

 

Dan  

 

Labels