Solved
New Contributor
Posts: 4

# Freq Report Customization

data test;

input desc \$;

datalines;

a1

a2

a3

a3

a2

a1

a1

a3

a2

a1

a3

a3

;

run;

proc freq data=test;

tables desc;

run;

Have:

desc Frequency Percent Cumulative
Frequency Cumulative
Percent
 a1 4 33.33 4 33.33 a2 3 25 7 58.33 a3 5 41.67 12 100

Want:

 Summary a1 a2 a3 4 3 5

Accepted Solutions
Solution
‎07-20-2016 03:00 PM
Super User
Posts: 6,781

## Re: Freq Report Customization

There are going to be ways to do this in one step, but the two-step version is easy to understand:

proc freq data=test;

tables desc / noprint out=counts;

run;

proc tabulate data=counts;

class desc;

var count;

tables count, desc=' '*sum=' ';

title 'Summary';

run;

All Replies
Solution
‎07-20-2016 03:00 PM
Super User
Posts: 6,781

## Re: Freq Report Customization

There are going to be ways to do this in one step, but the two-step version is easy to understand:

proc freq data=test;

tables desc / noprint out=counts;

run;

proc tabulate data=counts;

class desc;

var count;

tables count, desc=' '*sum=' ';

title 'Summary';

run;

🔒 This topic is solved and locked.