Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Excluding a group by one criteria

LisaTerry
5 - Atom

Hello, I'm trying to build a list of people who fit into a certain criteria from a large list where ID's appear multiple times.

 

For safety of information I will use a different topic of data but the process/results would be the same.

Say I want to build a zoo and I have a list of names and animals people have seen, the names can appear multiple times due to each animal they have seen.

I decided that I want to advertise to this list of people that my zoo has tigers so I want to filter this list of names to all the the people that haven't seen tigers before. 

For ease this list has four animals, penguins, tigers, elephants, giraffes. My end result wanted would be a list of names that haven't seen a tiger, because they might have seen the other three animals they'll be in the list three times. How do I filter and work out how to calculate the ones that haven't seen tigers? 

 

Data will look like this
NAME: Alice ANIMAL: penguin

NAME: James ANIMAL tiger

NAME: Charlie ANIMAL giraffe

NAME: James ANIMAL penguin

NAME: Alice ANIMAL giraffe

 

So from the above my results need to pull out Alice and Charlie because both have not seen Tigers, but I can't just do a simple question of "if the animal equals tiger then don't include name" because, like with James, he's seen a tiger, so the line with animal as tiger wont be included but the line with the penguin will which is not what I want.

Hopefully this makes sense.

If it helps the end result is just a data set wanted, simple row of names and the names being only those that haven't seen tigers before.

 

6 REPLIES 6
aatalai
14 - Magnetar

@LisaTerry does this help?

LisaTerry
5 - Atom

Thanks for the download! However due to safety I can't download this, could you explain what you've done/used at all please?

LisaTerry
5 - Atom

Thanks for the download! However due to safety I can't download this, could you explain what you've done/used at all please?

aatalai
14 - Magnetar

I've built a batch macro, it's a bit too complicated to explain it all, but here are some screenshots hope it helps

 

group by one 1.PNGmacro 3.PNGin the macro.PNGmacro 4.PNG

CPSlater
6 - Meteoroid

This seems to be what you are looking for? May have over simplified - let me know if so & I can have another look!

LisaTerry
5 - Atom

Thank you so much! :D

Labels