This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Early bird tickets for Inspire 2023 are now available! Discounted pricing closes on January 31st. Save your spot!
Hello,
Hoping someone can provide guidance/suggestions on how to best handle to following:
I have already performed a number of steps to arrive at my desired final population of records (numbered 1 through 89 in this case) using the Record ID tool.
Now I need to obtain a random sample from this population considering the following:
1. Determine sample size based on the parameter: 10% of population count (89) with a maximum of 25 and a minimum of 5
a. The required sample size should be 9 in this case. This sample size should always be rounded up to the nearest whole integer (e.g., even if 10% of population was 8.1, the required sample size would still be 9).
b. I can't seem to determine a way for Alteryx to provide a basic RoundUp type formula/functionality like in Excel.
2. Have Alteryx produce a random sample based on the required sample size.
a. The usual supects Sample and Random % Sample tools don't seem to have a way of inputing required sample size automatically.
Thank you,
Eugene
Solved! Go to Solution.
@chris_love and I were very close. I just completed the exercise and created a workflow for you. We approached it in a similar way.
Thank you, both, for the quick and excellent solutions.
I appreciated the opportunity to learn doing this on my own as well as seeing a clearly laid out solution.
The only (minor) difference that I was initially considering for the sample size calculation formula was to use a combination of Ceil and Bound formulas (i.e., Ceil(Bound(0.1*[Count], 5, 25)).
Best Regards,
Eugene
I just realized that Random Sample Tool did not give me random sample at all. When I enter # of records, it might just give me first #. Thank you so much for sharing!