Help using Base SAS procedures

PROC TABULATE WIth 2 Class variables

Reply
Occasional Contributor
Posts: 14

PROC TABULATE WIth 2 Class variables

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
SAS Super FREQ
Posts: 8,743

Re: PROC TABULATE WIth 2 Class variables

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
Occasional Contributor
Posts: 14

Re: PROC TABULATE WIth 2 Class variables

Thanks Cynthia. I appreciate your help...Rod
Ask a Question
Discussion stats
  • 2 replies
  • 129 views
  • 0 likes
  • 2 in conversation