<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PROC Report Across Columns in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109904#M30536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; It is possible to do you you want because you can nest ACROSS variables under other ACROSS variables in order to get another level of variable -- which gives you another level of header. The fact that you are creating macro variables suggests that you have some degree of macro knowledge. Possibly something like a user-defined format might work, using CNTLIN, as already suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Without more information from you, like seeing your existing code or getting an idea of your data in more detail, it's hard to provide specific advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Here's a very simple example, that uses a DATA step program to make the "extra" header variable from a macro variable and then uses the NOCOMPLETECOLS option of PROC REPORT to get only 1 header above every unique value of AGE. See attached screenshot.&lt;BR /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11153i72342E04E43565C5/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="agehdr.png" title="agehdr.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Sep 2012 15:07:20 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2012-09-03T15:07:20Z</dc:date>
    <item>
      <title>PROC Report Across Columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109901#M30533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have code which produces a report where the number of columns may vary based upon the dataset using the ACROSS specification. Column grand totals are stored in unique macro variables GT_1 .... GT_x for as many columns as exist in the data. My question is, with a varying number of columns, is there any way to place the GT_x values above those columns (e.g., (N = 234), etc.)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 12:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109901#M30533</guid>
      <dc:creator>Doug</dc:creator>
      <dc:date>2012-08-31T12:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Across Columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109902#M30534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would create a value label format for the values of ACROSS that includes N=.&amp;nbsp; This can be done using a data step to create a CNTLIN data set for PROC FORMAT.&amp;nbsp; This will provide a data driven solution that will be flexable based on the number of levels in the ACROSS variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2012 13:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109902#M30534</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-08-31T13:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Across Columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109903#M30535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am afraid it is hard for proc report ,but it maybe easy for data step. What is your sample data and output you like ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2012 02:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109903#M30535</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-09-03T02:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: PROC Report Across Columns</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109904#M30536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; It is possible to do you you want because you can nest ACROSS variables under other ACROSS variables in order to get another level of variable -- which gives you another level of header. The fact that you are creating macro variables suggests that you have some degree of macro knowledge. Possibly something like a user-defined format might work, using CNTLIN, as already suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Without more information from you, like seeing your existing code or getting an idea of your data in more detail, it's hard to provide specific advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; Here's a very simple example, that uses a DATA step program to make the "extra" header variable from a macro variable and then uses the NOCOMPLETECOLS option of PROC REPORT to get only 1 header above every unique value of AGE. See attached screenshot.&lt;BR /&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11153i72342E04E43565C5/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="agehdr.png" title="agehdr.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Sep 2012 15:07:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/PROC-Report-Across-Columns/m-p/109904#M30536</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-09-03T15:07:20Z</dc:date>
    </item>
  </channel>
</rss>

