BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
XiaoGuaiShou
Obsidian | Level 7

Hi Everyone, 

In proc tabulate, I run keyword to my data (for example,  mean median), but I want to delete the left column with nothing as following snip shot:

 Capture.PNG

How to resolve this? Any help would be greatly appreciated.

 

Thanks ahead,

 

Smiley WinkThe code I have:

data score;
   infile datalines delimiter=','; 
   input name $ score  YEAR ;
   datalines;                      
John,98,2018
Mary,95,2017
Tom,100,2016
Jerry,80,2016
;

proc tabulate data=score;
		class YEAR/ order=data preloadfmt;
		classlev YEAR;
        var score;

	table score=""*(n='Number of Respondents'*f=comma10. min='Minimum'*f=dollar10. q1='Lower Quartile'*f=dollar10.
	mean='Average'*f=dollar10. median='Median'*f=dollar10. q3='Upper Quartile'*f=dollar10. max='Maximum'*f=dollar10. stddev='Standard Deviation'*f=dollar10.)*[style=[JUST=r vjust=c]]	,
(YEAR= "")*[style=[Cellwidth=200]]/box={s=[just=L]} style_precedence=row printmiss misstext='' ;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Try

 

options missing="";
proc tabulate data=score;
	class YEAR/ order=data preloadfmt;
	classlev YEAR;
    var score;
	table (n='Number of Respondents'*f=comma10. min='Minimum'*f=dollar10. 
        q1='Lower Quartile'*f=dollar10.
    	mean='Average'*f=dollar10. median='Median'*f=dollar10. 
        q3='Upper Quartile'*f=dollar10. max='Maximum'*f=dollar10. 
        stddev='Standard Deviation'*f=dollar10.)*[style=[JUST=r vjust=c]] ,
        score=""*(YEAR= "")*[style=[Cellwidth=200]]/box={s=[just=L]} 
        style_precedence=row printmiss misstext='' ;
run;
PG

View solution in original post

2 REPLIES 2
PGStats
Opal | Level 21

Try

 

options missing="";
proc tabulate data=score;
	class YEAR/ order=data preloadfmt;
	classlev YEAR;
    var score;
	table (n='Number of Respondents'*f=comma10. min='Minimum'*f=dollar10. 
        q1='Lower Quartile'*f=dollar10.
    	mean='Average'*f=dollar10. median='Median'*f=dollar10. 
        q3='Upper Quartile'*f=dollar10. max='Maximum'*f=dollar10. 
        stddev='Standard Deviation'*f=dollar10.)*[style=[JUST=r vjust=c]] ,
        score=""*(YEAR= "")*[style=[Cellwidth=200]]/box={s=[just=L]} 
        style_precedence=row printmiss misstext='' ;
run;
PG
XiaoGuaiShou
Obsidian | Level 7
WOW! I want to say it is awesome~! It is exactly what I want. Thank you so much.

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
  • 2 replies
  • 748 views
  • 1 like
  • 2 in conversation