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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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