Trying to do a random sample selection in Alteryx that is proportional based on each region or state. For example, I have 7 stores across the US (California, Montana, Wisconsin, Florida, Illinois, Rhode Island, and New York), but I have more sales volume in New York than Rhode Island. I want the sample selection to be weighted appropriately based on population of sales. Also need every location to have at least one sample selected. Please see example below for how I would select samples manually. Is there a way to do this in Alteryx?
We would select 25 samples across the 7 locations below.
Population
- California - 205 sales
- Montana - 101 sales
- Wisconsin - 49 sales
- Florida - 326 sales
- Illinois - 22 sales
- Rhode Island - 89 sales
- New York - 444 sales
Total sales = 1,236
Sample Selection (total of 25 samples with each state at least getting one sale selected):
- California - 4 sales based on 17 % of total population
- Montana - 2 sales based on 8 % of total population
- Wisconsin - 1 sale based on 4% of total population
- Florida - 6 sales based on 26% of total population
- Illinois - 1 sale based on 2% of total population
- Rhode Island - 2 sales based on 7% of total population
- New York - 9 sales based on 36% of total population