<?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: Summarize using Proc Report when there are 3 or more groups in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/m-p/450241#M69699</link>
    <description>Yes, this is what i am looking for. Thanks a lot!</description>
    <pubDate>Sun, 01 Apr 2018 15:51:50 GMT</pubDate>
    <dc:creator>gnetnaw</dc:creator>
    <dc:date>2018-04-01T15:51:50Z</dc:date>
    <item>
      <title>Summarize using Proc Report when there are 3 or more groups</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/m-p/450169#M69690</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I check if I m allowed to use Proc Report to summarize multiple groups?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for eg. if i have region,country, state, zip-code, different expenses as my variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would want would the report to have a listing of zip-code and then the data would be further sum up by state, country &amp;amp; region (all in one report)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would appreciate your reply. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Mar 2018 18:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/m-p/450169#M69690</guid>
      <dc:creator>gnetnaw</dc:creator>
      <dc:date>2018-03-31T18:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize using Proc Report when there are 3 or more groups</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/m-p/450179#M69691</link>
      <description>&lt;P&gt;Hi, I guess I don't understand exactly what you mean when you say: "a listing of zip-code and then the data would be further sum up by state, country &amp;amp; region (all in one report)" -- it's hard to visualize the report you want from this description. &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; Yes, PROC REPORT can produce summaries on multiple items. So can PROC MEANS, so can PROC TABULATE.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; What code have you tried and what is the ultimate destination for the report (RTF, PDF, HTML?)&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; I have an example of multiple summaries using SASHELP.PRDSALE. Here is what it looks like for 1 country (CANADA), 2 regions (EAST and WEST), 2 divisions (CONSUMER and EDUCATION) and 5 products. This same type of summary also appears for the other 2 countries, GERMANY and U.S.A. -- but for space, I'm only showing one country here. You'd have to run the code below to see the report for all 3 countries in HTML format.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="use_report_summary.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/19557iD2970D3D10434368/image-size/large?v=v2&amp;amp;px=999" role="button" title="use_report_summary.png" alt="use_report_summary.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the complete code that produced the report:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html path='c:\temp' file='sum_prdsale.html';
title;
proc report data=sashelp.prdsale spanrows;
  column country region division product actual predict;
  define country / group;
  define region / group;
  define division / group;
  define product / group;
  define actual / sum;
  define predict / sum;
  break after country / summarize style={background=lightyellow};
  break after region / summarize style={background=lightgreen};
  break after division / summarize style={background=verylightblue};
  rbreak after / summarize style=Header;
  compute after country;
    country = 'C-tot';
	line ' ';
  endcomp;
  compute after region;
    region = 'R-tot';
  endcomp;
  compute after division;
    division = 'D-tot';
  endcomp;
  compute after;
    Country = 'Gr-tot';
  endcomp;
run;
ods html close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Sat, 31 Mar 2018 19:42:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/m-p/450179#M69691</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-03-31T19:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize using Proc Report when there are 3 or more groups</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/m-p/450241#M69699</link>
      <description>Yes, this is what i am looking for. Thanks a lot!</description>
      <pubDate>Sun, 01 Apr 2018 15:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summarize-using-Proc-Report-when-there-are-3-or-more-groups/m-p/450241#M69699</guid>
      <dc:creator>gnetnaw</dc:creator>
      <dc:date>2018-04-01T15:51:50Z</dc:date>
    </item>
  </channel>
</rss>

