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
SAS Super FREQ
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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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