BookmarkSubscribeRSS Feed
RodTennant
Calcite | Level 5
Greetings,

How can I display the value of the CLASS variables on each line of a PROC TABULATE procedure with multiple CLASS variables? For example,

CLASS AUTO YR;
TABLE (AUTO=' ')*(YR=' '), ALL /rts=20 misstext='0';

output is:

BUICK 2005 10
2006 5
2007 10
FORD 2006 10
2007 10

What I want:

BUICK 2005 10
BUICK 2006 5
BUICK 2007 10
FORD 2006 10
FORD 2007 10

Any help would be greatly appreciated.

Thank you

Rod
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
That is something that TABULATE is not designed to do. This question has come up before and the answer is still the same:
http://support.sas.com/forums/thread.jspa?messageID=49759쉟

Basically, you either create an output dataset with TABULATE and then use other methods (like PROC PRINT) to create a report from the output dataset, or, you switch to PROC REPORT. Except for the KURTOSIS and SKEWNESS and some of the percent statistics, PROC REPORT has the ability to create the same statistics as TABULATE -- and because of the ability to use a COMPUTE block, you can work things out so that the CLASS variable value (would be ORDER or GROUP in REPORT) is repeated on every report row.

cynthia
RodTennant
Calcite | Level 5
Thanks Cynthia. I appreciate your help...Rod

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1446 views
  • 0 likes
  • 2 in conversation