BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I would like to have proportions rather than percents output when I use Proc Tabulate.

For example, I have a program that reads as follows:

PROC TABULATE data = data set MISSING;
CLASS hotelname billprob;
TABLES NAME=' ',(billprob)*(n pctn)/ misstext='0';
RUN;

I am getting just what I want (the percent of people responding yes versus no to having a billing problem for each of a series of hotels). BUT ideally I would like a proportion.

I have searched and searched and can't seem to find a format or command to get proportions in proc tabulate.

Any ideas?

Thanks!!
2 REPLIES 2
deleted_user
Not applicable
For some reason an emoticon appeared where I had a > ... my program does NOT include a winking smiley face!!
Olivier
Pyrite | Level 9
I can't think of any way to do that with a simple Tabulate procedure.
But I believe you can achieve this computing counts and proportions beforehand, storing them in a dataset, and creating a text variable with the right proportion in it. Then display your dataset with either REPORT or PRINT procedures, to get the right outfit.

Olivier

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1575 views
  • 0 likes
  • 2 in conversation