Hi there, Not sure if the title makes much sense, but I'll do my best to explain better here. What I am looking for is a way to take a random sample of records from a dataset (say, using proc surveyselect) and have the sample fit a piece of criteria based on the sum of one of the variables in the dataset. Here's an example: Say you own a fast food hamburger restaurant and have a dataset called ORDERS, which contains a record for each order placed at a register. Variables may include a unique order ID, price, payment method, and number of hamburgers ordered. That last variable is important. Say the manager wants to get a random sample of 100 orders from his restaurant, but he wants to ensure that the random sample contains a certain number of hamburgers ordered for quality purposes. How would he go about doing that? Basically, I want a random sample of 100 orders where the sample considers the sum of the variable number of hamburgers ordered. The number of records that I want to sample is fixed ahead of time, but I want to make sure that, say, 200-250 hamburgers are considered. Assume the dataset is large enough that any criteria I put for the sum variable criteria is possible. Thanks for any help you may be able to provide!
... View more