BookmarkSubscribeRSS Feed
SASuser28
Fluorite | Level 6

I created a basic report that is broken up into a couple hundred categories by an ID name. Each category has a list of reports under that ID name that is named at the top. The sum of files under that ID name are counted for at the end of each category. My question is how to include the ID name into the n= statement. is that possible? for ex. the end would read Total count of ID... : 

 

Proc Sort;

    BY ID FILE

PROC PRINT DATA=... NOOBS N= 'TOTAL COUNT:'

'FINAL COUNT:';

BY ID;

PAGEBY ID;

SUMBY ID;

RUN;

 

1 REPLY 1
Reeza
Super User

Usually you would use #byval(byvariable) as in this example but I'm not sure it works in a PRINT statement

 

http://support.sas.com/documentation/cdl/en/proc/68954/HTML/default/viewer.htm#p0f022tve3mt0tn162itr...

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2848 views
  • 0 likes
  • 2 in conversation