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

Sample one item every million rows (from a larger population)

AlbertoRefra
6 - Meteoroid

Hi everyone! 

I'm struggling figuring out how to sample one item every million rows. 

 

Let's suppose we have a population of 50 million rows. 

I have to sample 1 item for the first million rows, 1 item for the second million rows, 1 item for the third, and so on... 

 

Do you have any advice on how to do this? 

 

I guess a Macro should help, but I'm not familiar with these functionalities/tools yet. 

 

Thank you for your support!

11 REPLIES 11
DataNath
17 - Castor
17 - Castor

Just spotted this again now - @sergejs_kutkovics nailed it here. Totally forgot about the seed option to allow repeatability!

AlbertoRefra
6 - Meteoroid

Hi @sergejs_kutkovics,thanks for your answer! 
I had to avoid the "RandInt" formula because for my purpose every part of the workflow must be replicable.

Anyway, I managed to find a work-around and above all to leverage the batch macro and use a "manual" seed to be sure that running the workflows again I will always have the same results. 

 

Thanks also to @DataNath for your kind support in going more in depth with the solution!

Labels
Top Solution Authors