BookmarkSubscribeRSS Feed
ss171
Calcite | Level 5

Capture.PNG 

I used proc freq and print to calculate count and percentage . But please help me with the code in getting report similiar to this . How to use Proc tabulate to do this task ?

3 REPLIES 3
Ksharp
Super User
proc tabulate data=sashelp.class;
class sex;
table sex=' ' all='Total',n='count'*f=8.0 pctn='percent'/box='sex' ;
run;
ballardw
Super User

@ss171 wrote:

any way to have 1 row as well 


You need to describe what that means. I suspect if I thought about it I could come up with at least 4 meanings and possibly none of them would be what you want.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 475 views
  • 0 likes
  • 3 in conversation