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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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
  • 560 views
  • 0 likes
  • 3 in conversation