06-18-2013 04:57 PM
Is it possible to print only sum of a variable and not the grand total?
and also is it possible to suppress the group by variable appearing at the end?
06-18-2013 06:06 PM
I don't understand your question entirely and since you did not show any code, any data or any current output, then it is left to each person to imagine the report you are getting and the report you want. So, it's hard to figure out exactly what you mean. It seems you are using BY group processing. PROC PRINT is very "fixed" in the types of summary lines it will allow you to produce. PROC REPORT and PROC TABULATE are more flexible and the "go to" procedures if you need only certains types of summary information and do not wish to see the "detail" rows.
For example, SASHELP.CLASS has 19 observations. Can you rewrite your PROC PRINT code using SASHELP.CLASS or SASHELP.CARS to illustrate your issue and to give everyone an example of what you're getting that you do NOT want? And then everyone is starting from the same point with a dataset that they all have access to. So it will be easy for them to grab your code and make suggestions.
06-19-2013 03:33 PM
Thanks a lot for both your replies, I said both https://communities.sas.com/thread/6610?start=0&tstart=0 look at his you will know why.
I used proc report and it fits very well for the requirement.
06-19-2013 01:44 AM
Try Proc Summary as an Help, Hope it helps , illustrating with an example. Thanks.
input LandCost Vendor $;
proc sort data = revenue; by Vendor; run;
proc summary data = revenue ;
class Vendor; var LandCost;
output out = Rev1 (drop = _TYPE_ _FREQ_)
sum( LandCost) = sum_LC
data rev2; set rev1; if Vendor ~= ''; run;