Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Proc Tabulate problem

Status
Not open for further replies.

Grinder12000

IS-IT--Management
Jun 30, 2010
1
US
New to Proc Tabulate but can not find an answer.

I have the following table

Code:
-------------------------------------------------------
|                               |       MIDNME        |
|                               |---------------------|
|                               |    N     |    Y     |
|                               |----------+----------|
|                               |    N     |    N     |
|-------------------------------+----------+----------|
|RPUNITCD       |MIDNME         |          |          |
|---------------+---------------|          |          |
|400500         |N              |         6|          |
|---------------+---------------+----------+----------|
|401800         |N              |        65|          |
|               |---------------+----------+----------|
|               |Y              |          |       257|
|---------------+---------------+----------+----------|
|406400         |N              |        23|          |
|---------------+---------------+----------+----------|
|406700         |N              |       223|          |
|               |---------------+----------+----------|
|               |Y              |          |     1,071|

Notice I have Y and N in the 2nd column so there is no need to the extra columns with Y and N - I want ONE column with all the Counts (*N) since the rows for each Reporting Unit (400500) already have the Y and N. I'd liek to have all counts in one column!

My code is

PROC TABULATE DATA=AODADNLD FORMAT=COMMA10.
TITLE 'TESTING CLIENT CHARACTERISTICS';
CLASS RPUNITCD CLTCHAR;
TABLE RPUNITCD*CLTCHAR, CLTCHAR*N;
RUN;

Can this be done?

Rod
 
How would this look:-
Code:
 PROC TABULATE DATA=AODADNLD FORMAT=COMMA10.
 TITLE 'TESTING CLIENT CHARACTERISTICS';    
 CLASS RPUNITCD CLTCHAR;                    
 TABLE RPUNITCD*CLTCHAR, N;         
 RUN;

What is "Midnme"? IT's not mentioned in your code...

Chris
Business Analyst, Code Monkey, Data Wrangler.
SAS Guru.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top