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 

 

AI Navigator GIF.gif


Navigate AI governance with SAS tools for compliance and ethical AI practices. Try SAS Ai Navigator for free for the first six months.

Check it out on Microsoft Marketplace →

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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