Alteryx Designer Desktop Discussions

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

Record ID or Unique ID

TB_Mylene
7 - Meteor

Hi, I'm looking for assistance how I can assign unique ID’s based on an order by distance miles. Below is an example what I’m trying to accomplish under column E (New ID).

Sample.jpg

 

My goal is to extract the 4 nearest employees by distance miles then extract the nearest 3 stores by employee. Below is my end goal. 

 

I appreciate any guidance. Thanks in advance.

 

Sample end goal.jpg

4 REPLIES 4
ChrisTX
16 - Nebula

Try using a Sort tool then Sample tools (select first 4/3 records)

 

TB_Mylene
7 - Meteor

Thank you but that's not getting to what I need. Do you know how I can create the unique ID like my first example? What I need is the result in column E. I'm struggling to get the unique ID. 

LindonB
11 - Bolide

Hello! I’m trying to fully understand your question, but I’m a bit unclear on a few points. Specifically, I’m not sure where the Tile_Num in the top table is coming from, as it doesn’t seem to represent distance.

Also, when you mention taking the three shortest distances, are you referring to the sum of the distances, the closest store, or the sum of the top 3 stores? It’s not immediately clear how Tile_Num relates to these concepts.

Lastly, you mentioned wanting to take the 4 nearest employees, but I noticed there are only 3 listed in the second table under Tile_Num, and New ID doesn’t exceed 3.

It might be helpful if the field names were a bit more descriptive, so we can better understand the purpose of Tile_Num and New ID in the two tables.

All that said, if I assume...

  1. Tile_Num is given in table 1
  2. New ID in table 1 = Rank of Employees after sorting for distance (which I think is what Tile_Num represents)
  3. In table 2, you want to top 3 employees and 3 nearest stores.
  4. In table 2, Tile_Num = 1 for the top 3 employees.
  5. In table 2, New ID is the rank of the employee within the Tile_Num based on the previous Tile_Num from table 1.

...then I can replicate your results with the attached workflow. Let me know if you have questions or can provide any more clarification about your goal. Hope this helps!

TB_Mylene
7 - Meteor

You ROCK! This is exactly what I needed! Thank you much! 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels