Hi,
I am trying to obtain a random selection of 25 IDs and their corresponding records from a dataset. .
For reference, within my dataset, I have thousands of ID numbers, wherein each ID will appear multiple times given they have multiple records associated with the ID. I'd like to use one of the random sample tools within my workflow to select 25 of the IDs and return all of the records associated with the 25 IDs selected randomly.
I am very new to using Alteryx Designer, but I also may be overthinking this. Nonetheless, I can't seem to figure it out. Any knowledge or insight on how to accomplish will be greatly appreciated.
Thanks!
Solved! Go to Solution.
Hi Ira,
Certainly a ton more IDs in my dataset, but here is a screenshot that may help.
Thanks,
Chuck
Hi,
Just following up on my last reply for additional context. If IDs 02, 04, and 06 were among the randomly selected 25 IDs, the highlighted items would all be within the set of results.
Thanks again,
Chuck
I figured this out. From my original dataset, created a separate flow using the Select, Unique, and Random % Sample tools, focusing on the ID to produce the random sample of 25 IDs. Then I used a Join at the end of my overall workflow to get the results I'm after.
Nice solution. The workflow I posted is almost the same. I used a Formula tool to create a random number field, then sorted on the random number, then used a Sample tool to select the first 25.
Chris