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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1208 views
  • 1 like
  • 2 in conversation