BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DavidPhillips2
Rhodochrosite | Level 12
I have a dataset with columns  like:  
displayColumn _2014_15 _2014_15b _2015_16 _2015_16b
Demo Row 1 0.5 2 0.34
         
I'm trying to display the data set like this with proc report.  Please advise.
displayColumn 2014-15 2015-16
displayColumn _2014_15 _2014_15b _2015_16 _2015_16b
Demo Row 1 0.5 2 0.34

 

 

 

Starting data 


proc sql;
CREATE TABLE have (
displaycolumn varchar2,
col1 int,
col2 DECIMAL(10,2),
col3 int,
col4 DECIMAL(10,2)
);


insert into have (displaycolumn, col1, col2, col3, col4) values ("demo column", 1, .5, 2, .75);
quit;

 

I have the display 


proc report data=have;
column displaycolumn col1 col2 col3 col4;
define displaycolumn / group;
define col1 / analysis sum '2014-15' format=comma9.;
define col2 / analysis sum '2015-16' format=percent8.1;
define col3 / analysis sum '2014-15 %' format=comma9.;
define col4 / analysis sum '2015-16 %' format=percent8.1;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

proc report data=sashelp.class;

  column ('Top Header' ('One Header' name sex) ('Other Header' age height weight));

run;

 

Hope this helps,

Cynthia

 

View solution in original post

4 REPLIES 4
Tom
Super User Tom
Super User

You can add extra headers over groups of columns in the COLUMN statement.

DavidPhillips2
Rhodochrosite | Level 12

Extra headers will solve it.  I'm searching for an example of extra headers.

Cynthia_sas
SAS Super FREQ

Hi:

proc report data=sashelp.class;

  column ('Top Header' ('One Header' name sex) ('Other Header' age height weight));

run;

 

Hope this helps,

Cynthia

 

DavidPhillips2
Rhodochrosite | Level 12

Thanks your solution is easy.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 524 views
  • 1 like
  • 3 in conversation