Hello,
A question for Proc report. If I would like to get counts for column "Test_group" by using Proc report, is it possible? That column is text character, and I would like to restrict the condition to ">=1" . Please advice.
proc report data=Have;
column State Year Quarter Positive Test__groups_;
define Test__groups_/group 'Test Group le 1' order=data;
run;
Input data and what you want for output as examples. Since you don't show any details about what the other four variables contribute to the report it is hard to be sure what you want/expect.
Since you don't show any column to place the "count" into I am moderately sure that inside Proc report is not the place.
Count and filter the data?
proc freq data=Have noprint; tables State *Year* Quarter* Positive* Test__groups_/out=counts (where=(count ge 1)); run;
and print the data set counts.
could you post your dataset?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.