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;
... View more