12-17-2016 09:10 PM - last edited on 12-18-2016 12:59 AM by Reeza
proc sort data=Final
proc print data=final3;
var id name date manner_of_death armed age gender race city state flee body_camera;
where state in ('MA', 'CT', 'NH', 'VT', 'ME', 'RI');
So, I am trying to get count totals on the bottom of my tables for each page (attached) of the amount of records there. I do not want to sum any number...how do I do that??
12-17-2016 09:22 PM
I was looking for a summary for a total number on each state. If you look at my attachment where the n= is I want an area saying 'Total Number of' with the count of records for that page.
12-18-2016 12:53 AM
SUMLABEL on the PROC PRINT statement.
The documentation has an example of this implementation for PROC PRINT.
PROC PRINT has SUM or SUMBY statements, but you seem to have SUM BY(space). Check the log to see if SAS is correcting this for you, but it's good to be explicit in your syntax.
12-18-2016 12:56 AM
And if you don't have a record you want to SUM add a dummy variable that has a value of 1 to each record and use that but don't display it.
I think that would work, but haven't tested it.