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

Hello

I want to create 2 dimensional summary table.

What is the way to remove column with value " HORSEPOWER " and remove column with  value " Mean"  from output?

proc tabulate data=sashelp.cars ;
class ORIGIN TYPE ;
var  HORSEPOWER;
table TYPE*HORSEPOWER*mean, ORIGIN;
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
learsaas
Quartz | Level 8
table TYPE*HORSEPOWER=''*mean='', ORIGIN

View solution in original post

4 REPLIES 4
learsaas
Quartz | Level 8
table TYPE*HORSEPOWER=''*mean='', ORIGIN
Ronein
Onyx | Level 15

Thank you.

In your code solution I still see columns but they are empty.

How can I remove the columns?

proc tabulate data=sashelp.cars ;
class ORIGIN TYPE ;
var  HORSEPOWER;
table TYPE*HORSEPOWER=''*mean='', ORIGIN;
run;
Cynthia_sas
Diamond | Level 26

Hi:
change the TABLE statement
TABLE.... ORIGIN / row=float;
after ORIGIN and BEFORE the semi-colon.
Cynthia

ballardw
Super User

@Ronein wrote:

Thank you.

In your code solution I still see columns but they are empty.

How can I remove the columns?

proc tabulate data=sashelp.cars ;
class ORIGIN TYPE ;
var  HORSEPOWER;
table TYPE*HORSEPOWER=''*mean='', ORIGIN;
run;

 

Perhaps

proc tabulate data=sashelp.cars ;
   class ORIGIN TYPE ;
   var  HORSEPOWER;
   table TYPE*HORSEPOWER=''*mean='', 
         ORIGIN
         /row=float
   ;
run;

but the appearance with row=float can change depending on ODS destination.

 

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
  • 4 replies
  • 1422 views
  • 1 like
  • 4 in conversation