BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
yogita_patel
Calcite | Level 5

Hi, i want to merge or add row under column header with some constant value for all my 5 column 

i got his 

yogita_patel_0-1650028498027.png

but i want like this 

yogita_patel_1-1650028540670.png

can someone help?

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

What happens if you remove this?

 

compute before order;
line '';
endcomp;

or change it to

 

compute after order;
line '';
endcomp;

 

--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

We'd need to see your code in order to answer your question.

 

You might also want to look at the %TABLEN macro. https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-...

--
Paige Miller
yogita_patel
Calcite | Level 5

i have created seperate dataset with value 'n (%)' and stack them

 

 

 

proc report data=final nowd headskip headline split='*'
style = {outputwidth=100% } spacing=1 wrap;
column order newvar trt_1 trt_2 trt_3 trt_4 trt_9;
define order/ order noprint ;
define newvar/display '' style(column)={asis=on};
define trt_1/ display "Placebo * (N=&trt1)" center;
define trt_2/ display "Tanezumab 5 * mg *(N=&trt2)" center;
define trt_3/ display "Tanezumab 10 * mg *(N=&trt3)" center;
define trt_4/ display "Naproxen 500 * mg BID * (N=&trt4)" center;
define trt_9/ display "Total * (N=&trt9)" center;
compute before order;
line '';
endcomp;
compute after _page_;
line'';
endcomp;

run;

PaigeMiller
Diamond | Level 26

What happens if you remove this?

 

compute before order;
line '';
endcomp;

or change it to

 

compute after order;
line '';
endcomp;

 

--
Paige Miller
yogita_patel
Calcite | Level 5

thank you so much 

it worked 

compute after worked

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 2231 views
  • 1 like
  • 2 in conversation