Alteryx Designer Desktop Discussions

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

Filtering List by Nearest Point to 1 of 2 Destinations

ijurgensen
7 - Meteor

Goooooood Morning Alteryx!

 

I have a workflow built to create points and measure distances between each of the destinations "A" and "B", and each household within a list. The product of this is a table similar to the one below. I need to identify which destination has the closest distance, and delete or filter out all of the other rows, output similar to what's shown.

 

Current Workflow Output

 

DestinationHouseholdDistance
AGandalf3
BGandalf5
AFrodo7
BFrodo6
ASam14
BSam23
ASauron65
BSauron73

 

 

Desired Workflow Output

 

DestinationHouseholdDistance
AGandalf3
BFrodo6
ASam14
ASauron65

 

Thank you!

2 REPLIES 2
Luke_C
17 - Castor

Have you tried using the 'find nearest' tool? If you Have your destinations in one table, and your households in the other table it should be straightforward to accomplish. The tool has some built-in examples you can look at. 

AngelosPachis
16 - Nebula

Hi @ijurgensen ,

 

You can sort your table per household and then distance (in ascending order so sorter distance comes first). Then with a sample tool, you can only keep the first record per household (group by household)

 

AngelosPachis_0-1614701442446.png

 

Hope that helps, let me know if you have any questions.

 

Angelos

 

Labels