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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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