BookmarkSubscribeRSS Feed
Susanne
Calcite | Level 5

Hello SAS Community,

 

I want to create a table with proc tabulate with nested columns and some, but not all column grid lines.

 

That is the table, col1 has 2 categories. :

 

proc tabulate data=data ;
    class col1 col2  ;
    var row;
    table row=''*mean,
           col1='' * col2 = ''  
          /s=[frame=void rules= cols];
  run;

 

That way I get lines between all columns.

 

But I want to create grid lines or rules only between columns which are separated by the col1 variable. So there should be all categories of col2 first (without grid lines) under the first category of col2 and then should come one grid line, separating the two categories of col1, and then there should come all the categories of col2 again without grid lines.

 

Is this somehow possible?

 

Thank you very much!

 

 

I'm using SAS 9.3.

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

There is no provision to dot this in SAS reports.

If it's a really important feature and if it must be automated, the "easiest" (though not easy) route may be to create an HTML report and to post-process the HTML tags, maybe to have white-colored cell borders rather than multi-column cell spans.

error_prone
Barite | Level 11
Funky things can be done with proc template, but i am not sure wether your requirement belongs to the things possible.
Susanne
Calcite | Level 5

Thank you very much for your help! I will try to find solutions without grid lines.

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