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?
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
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.
Ready to level-up your skills? Choose your own adventure.