<?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- Columns one below an other in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Columns-one-below-an-other/m-p/750307#M235978</link>
    <description>&lt;P&gt;Proc report doesn't want to use more than one variable/statistic in a column. What are you needing to do that you think you want to switch to Report since you are going to add a fair amount of work to do something "unnatural" for Report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could manage this, possibly, by transposing the data so that the source data has a new variable that holds the value of the variable name, such as Make and Model, and a new variable to hold the actual values.&lt;/P&gt;
&lt;P&gt;Such as&lt;/P&gt;
&lt;PRE&gt;data changeclass;
   set sashelp.cars;
   /* this array has the elements you want to stack must be of the same type*/
   array a (*) make model; 
   do i=1 to dim(a);
      varname =vname(a[i]);
      value = a[i];
      output;
   end;
   drop i make model;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;But&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT size="4" color="#000000"&gt;that will duplicate all of the other variables. So statistics you request for Msrp would be incorrect. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;So you would need to set most of those other variables to missing. Depending on what you expected to do there are likely to be lots of complications.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;You could use the Varname and Value created variables as group variables but that may not be sufficient.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 19:56:11 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-06-24T19:56:11Z</dc:date>
    <item>
      <title>PROC REPORT- Columns one below an other</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Columns-one-below-an-other/m-p/750284#M235961</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently using the following proc tabulate code to generate count and descriptive statistics across Type and Origin.&lt;/P&gt;
&lt;PRE&gt;proc tabulate data= sashelp.cars; 
class Type origin make model / style=[foreground=blue just=c] missing;
var msrp;
table ((make model)* (N))
	  ((msrp) * (NMISS N MEAN MEDIAN MIN MAX)),
	  ALL Type origin/ misstext='0';
run;&lt;/PRE&gt;
&lt;P&gt;I am trying to replicate the same thing in proc report, however, when I group the make and model, the values end up next to each other and not one below another.&amp;nbsp;&lt;BR /&gt;Is this even possible in proc report?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any sort of help would help a lot!&amp;nbsp;&lt;BR /&gt;Thanks in advance!&lt;BR /&gt;P.S. I tried the BREAK statement in PROC REPORT but that didn't pan out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 19:26:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Columns-one-below-an-other/m-p/750284#M235961</guid>
      <dc:creator>sam_sas2</dc:creator>
      <dc:date>2021-06-24T19:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT- Columns one below an other</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Columns-one-below-an-other/m-p/750292#M235967</link>
      <description>&lt;P&gt;Hi &lt;A class="trigger-hovercard" style="color: #007dc3;" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/327668" target="_blank"&gt;sam_sas2&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For PROC REPORT you can control columns hierarchy, see the following example from &lt;A href="https://www.lexjansen.com/mwsug/2014/SA/MWSUG-2014-SA12.pdf" target="_self"&gt;Report Customization Using PROC REPORT&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC REPORT DATA=SASHELP.SHOES NOWD;
   COLUMN('Global shoe sales in USD'('Regional Shoe sales' REGION PRODUCT SUBSIDIARY) ('In USD only' SALES));
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 19:45:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Columns-one-below-an-other/m-p/750292#M235967</guid>
      <dc:creator>LeonidBatkhan</dc:creator>
      <dc:date>2021-06-24T19:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT- Columns one below an other</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Columns-one-below-an-other/m-p/750307#M235978</link>
      <description>&lt;P&gt;Proc report doesn't want to use more than one variable/statistic in a column. What are you needing to do that you think you want to switch to Report since you are going to add a fair amount of work to do something "unnatural" for Report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could manage this, possibly, by transposing the data so that the source data has a new variable that holds the value of the variable name, such as Make and Model, and a new variable to hold the actual values.&lt;/P&gt;
&lt;P&gt;Such as&lt;/P&gt;
&lt;PRE&gt;data changeclass;
   set sashelp.cars;
   /* this array has the elements you want to stack must be of the same type*/
   array a (*) make model; 
   do i=1 to dim(a);
      varname =vname(a[i]);
      value = a[i];
      output;
   end;
   drop i make model;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;But&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT size="4" color="#000000"&gt;that will duplicate all of the other variables. So statistics you request for Msrp would be incorrect. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;So you would need to set most of those other variables to missing. Depending on what you expected to do there are likely to be lots of complications.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="4" color="#000000"&gt;You could use the Varname and Value created variables as group variables but that may not be sufficient.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 19:56:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-Columns-one-below-an-other/m-p/750307#M235978</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-24T19:56:11Z</dc:date>
    </item>
  </channel>
</rss>

