BookmarkSubscribeRSS Feed
chinna
Calcite | Level 5

how to remove headers in proc report when multiple across function is used in the define statement ???????

and How compute mutliple columns when multiple across function is used???????

4 REPLIES 4
ChuckMoore
Calcite | Level 5

Remove some headers or all headers?

For multiple columns you have to use the _c#_ notation, where # is the number of the column in the report.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000068725.htm

chinna
Calcite | Level 5

I want to remove some headers formed because of the usage of the across function????????????

chinna
Calcite | Level 5

proc report data=xyz out=pqrs;

col SOLID Group Zone nca,(segment,(tot_cnt FD_cnt fd_pen));

define SOLID /r group;

define Group / "Mega zone" Group;

define Zone / Group;

define nca / across;

define  segment / across;

define tot_cnt / analysis;

define fd_cnt / analysis;

define fd_pen / computed format=percent6.0;

rbreak after / ol summarize;

compute fd_pen;

fd_pen = _c5_/_c4_;

endcomp;

run;

in the bove report iam not getting the desired ouput for the computed column???????????

As asked earlier how can we remove the headers created becuase of usage of multiple across functions????????????

Cynthia_sas
SAS Super FREQ

Hi:

  For TOT_CNT, FD_CNT and FD_PEN, if you want to remove their headers, you would use ' ' (quote space quote) on the DEFINE statement for each variable.

  For the ACROSS items, NCA and SEGMENT, ' ' (quote space quote), again, would blank out the headers for those items in the header area.

  As for your question about the COMPUTED column, since you are computing multiple occurences of FD_PEN, since that will be computed UNDER each combination of your ACROSS item, then you would have something like (not tested with your data -- so the numbers may need to change):

compute fd_pen;

  _c6_ = _c5_/_c4_;

  _c9_ = _c8_/_c7_;

endcomp;

For each occurenct of FD_PEN you need to calculate under the combinations of NCA and SEGMENT. To find out, for sure the absolute column names that REPORT is creating for each of your ACROSS variables, look at the OUT= file with PROC PRINT and you should be able to figure out the right absolute column numbers to use.

cynthia

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!

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.

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
  • 4 replies
  • 806 views
  • 0 likes
  • 3 in conversation