Frequency of Column Totals

Solved
Occasional Contributor
Posts: 9

Frequency of Column Totals

I'm still learning SAS and I'm slightly confused once again.

I basically have a table and I just want to see the freq distribution of a few variable totals.

Sample data:

``````data have;
input zip \$ branch \$ box1_99 box100_199 box199_200;

datalines;
501 52--- 1 1 0
501 81--- 2 0 0
501 99--- 1 1 6
101 22--- 2 10 30
101 23--- 48 24 60
101 31--- 40 20 50
101 42--- 56 36 70
;
run;

proc print;
run;``````

And from the sample data, this is the output I'd like to see:

Bonus question: Should I want to see the output for only a specific zip, how should the code be revised?

Any help in the right direction would be greatly appreciated.

Regards,

Tony

Accepted Solutions
Solution
‎01-23-2018 12:52 AM
Occasional Contributor
Posts: 9

Re: Frequency of Column Totals

For the benefit of future newbies like me...

``````proc means sum maxdec=0;
*** where zip=101;
var box1_99 box100_199 box199_200;
run;``````

All Replies
Solution
‎01-23-2018 12:52 AM
Occasional Contributor
Posts: 9

Re: Frequency of Column Totals

For the benefit of future newbies like me...

``````proc means sum maxdec=0;
*** where zip=101;
var box1_99 box100_199 box199_200;
run;``````
☑ This topic is solved.