Hi,
I have a list of 400 names that can be non-exclusively A, B, C or D. So:
Names | Category |
Name 1 | A |
Name 2 | A |
Name 2 | B |
Name 2 | D |
Name 3 | B |
Name 4 | C |
Name 4 | D |
Name 5 | D |
Name 6 | A |
Name 6 | D |
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?
Solved! Go to Solution.
Hi @Lucasvital
I'd do this way
- 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,
Hi @Lucasvital
Here's a completely different way to do it
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
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