BookmarkSubscribeRSS Feed
Pinky9
Calcite | Level 5

Hi,

proc tabulate data=Drug;

format gender gender. c2 prefer.;

class gender age c2/mlf mlf preloadfmt order=data ;

tables all='Base :All Respondents' c2*colpctn=''f=9.2 ,(all='Total' gender age)*N=''*f=7.0;

run;



the above syntax is not working for colpctn .Can some one correct the syntax.

the objective is to print the % values of c2 variable with total and gender as columns on which % is calculated.


Thanks

1 REPLY 1
Mit
Calcite | Level 5 Mit
Calcite | Level 5

please post some sample data with expected output

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!

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
  • 1 reply
  • 464 views
  • 0 likes
  • 2 in conversation