Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Grouping based on multiple columns

aband
6 - Meteoroid

Hi,

 

I am having trouble achieving the results I need.

 

I want to create a Group ID based on two variables (ID#2 and ID#3). However, an entry may be considered apart of the same group if ID#2 falls within ID#3 or vice versa.


The example I've attached is incorrectly grouping all these values in separate Group IDs when I need all of the entries to be tagged as Group ID 126.

 

Thank you in advance for your help!

3 REPLIES 3
apathetichell
17 - Castor

What is your grouping logic? I can't tell just by looking at your data.

aband
6 - Meteoroid

Apologies for not being clear. 

 

It might be easier to see with a smaller subset of data. From the screenshot below, I've highlighted IDs that should all be grouped together under Group ID 126 because they have a common variable present either under ID #2 or ID #3 (NSLP000003289).

 

However, the items highlighted in orange are being grouped incorrectly. The idea is if the ID exists within the ID #2 group or within the ID #3 group elsewhere, it should be included with the previously existing group.

 

aband_0-1630415820938.png

 

Please let me know if there's anything else I can clarify. Thank you!!

camerondsteele
6 - Meteoroid

Does this do what you need?

Labels