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

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
BrunoMueller
SAS Super FREQ

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

1 REPLY 1
BrunoMueller
SAS Super FREQ

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

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