The SAS Output Delivery System and reporting techniques

Displaying a Value Across Columns

Accepted Solution Solved
Reply
Super Contributor
Posts: 494
Accepted Solution

Displaying a Value Across Columns

How do I display a value across columns, in this case column percent?  I am trying to replace the ones with values.

 

proc report data=CombinedpctTable;
column MINORITY_STATUS academic_period_desc;
define percent / analysis sum /*format=percent8.*/;
define MINORITY_STATUS /group;
define academic_period_desc /across;
run;

 

  ACADEMIC_PERIOD_DESC MINORITY_STATUS Fall 2011 Fall 2012 Fall 2013 Fall 2014 Fall 2015 Fall 2016
Minority111111

 


Accepted Solutions
Solution
‎04-24-2017 02:30 PM
SAS Super FREQ
Posts: 706

Re: Displaying a Value Across Columns

Hi

 

By default the number of rows is displayed. You can use nesting like this classVar, analysisVar or the other way round.

 

the code sample also show how to use the same column more than once by giving it an alias, this allows you to define each column individually.

 

code sample:

proc report data=sashelp.cars;
  column type origin, invoice invoice=invoice2, origin=origin2;
  define type / group;
  define origin / across;
  define origin2 / across;
  define invoice / analysis sum format=comma12.;
  define invoice2 / analysis sum format=commax12.;
run;

Bruno

View solution in original post


All Replies
Solution
‎04-24-2017 02:30 PM
SAS Super FREQ
Posts: 706

Re: Displaying a Value Across Columns

Hi

 

By default the number of rows is displayed. You can use nesting like this classVar, analysisVar or the other way round.

 

the code sample also show how to use the same column more than once by giving it an alias, this allows you to define each column individually.

 

code sample:

proc report data=sashelp.cars;
  column type origin, invoice invoice=invoice2, origin=origin2;
  define type / group;
  define origin / across;
  define origin2 / across;
  define invoice / analysis sum format=comma12.;
  define invoice2 / analysis sum format=commax12.;
run;

Bruno

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 135 views
  • 0 likes
  • 2 in conversation