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

Alteryx Designer Desktop Discussions

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

Comparing Values within list by ID and Assigning Flag

The_Alternator
6 - Meteoroid

My data is like this:

 

ID | Region

1A | Upper Midwest

1A | Upper Midwest

1A | Pacific

2B | East Coast

2B | East Coast

3C | Pacific

3C | Pacific

3C | Northwest

3C | Northeast

 

What I want to do is classify, by ID, whether there are multiple regions for the same ID or whether they're all the same. So for 1A, I would want a field saying "Multiple" as a value for each record with 1A as the ID. So like this:

 

ID | Region | Classification

1A | Upper Midwest | Multiple

1A | Upper Midwest | Multiple

1A | Pacific | Multiple

2B | East Coast | Same

2B | East Coast | Same

3C | Pacific | Multiple

3C | Pacific | Multiple

3C | Northwest | Multiple

3C | Northeast | Multiple

 

Thanks

1 REPLY 1
Luke_C
17 - Castor
17 - Castor

Hi @The_Alternator 

 

One approach you could use is to use the summarize tool to count the distinct regions within each ID. Then use an if statement to classify based on if that count is >1. 

 

Luke_C_0-1617376442029.png

 

 

 

Labels
Top Solution Authors