BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sathish_jammy
Lapis Lazuli | Level 10

Hi experts, 

I'm trying to align my analysis in a particular format but my code won't work.

I need your suggestion to align in the given format. Kindly go through the below sample.

data have;
input age$5. Grp$ arg$;
cards;
18-25 G a
18-25 G b
18-25 O c
18-25 P a
18-25 G c
26-35 P b
26-35 G a
26-35 G a
;
proc tabulate data = have;
class age Grp arg;
tables age*Grp, arg;
run;

 img s.jpg

The result shares the perfect OP values but I required it in the right side displayed tabular format.

Please help me to rearrange the table. I tried a lot but nothing works well.

Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Sounds like you want 

tables age, arg*grp*N ;

You can use 

keylabel n=' ';

to suppress the adding of the N label to the report.

View solution in original post

2 REPLIES 2
Tom
Super User Tom
Super User

Sounds like you want 

tables age, arg*grp*N ;

You can use 

keylabel n=' ';

to suppress the adding of the N label to the report.

Sathish_jammy
Lapis Lazuli | Level 10

Thank you so much, Buddy! You made my day @Tom 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register 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.

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