Yes, use a Summary Task to get the counts first.
Make sure to create an output data set with this task.
Then Filter the output data set to only include the 0 records.
Via code it would look something like this, assuming you were trying to find the # of 12 year olds by each sex in a data set.
Input data set name is sashelp.class and the variable names are age and sex.
The summary data is in the SummaryTable data set and the final filtered result is in the Filtered data set.
proc freq data=sashelp.class;
table sex*age / out=summaryTable outpct;
run;
data filtered;
set summaryTable;
where age=12;
drop percent pct_col;
rename pct_row = PercentAge12;
run;
proc print data=filtered;
run;
@CurryThree6 wrote:
hello, I'm fairly new at SAS EG. I have a SAS date set with columns Product Name and Units Ordered with 10 Product Names, and Units Ordered range from 0-500, and are in 10s (0, 10, 20, etc). I'm confused on how I can create a report that shows both how many times orders were placed with 0 units for each of the different products, and what percentages of the orders for these different products had 0 units ordered. Any help? I'm thinking I'm supposed to use either a Summary Table or Summary Statistics, but just can't quite get it.
... View more