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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.