<?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 PROC REPORT by different groups for summation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-by-different-groups-for-summation/m-p/710416#M218691</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get &lt;U&gt;&lt;STRONG&gt;summation of a variable by different groups&lt;/STRONG&gt;&lt;/U&gt; using PROC REPORT procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I want to compute the &lt;U&gt;&lt;STRONG&gt;summation of invoice by origin&lt;/STRONG&gt;&lt;/U&gt; in the &lt;U&gt;&lt;STRONG&gt;sashelp.cars&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.cars; 
column (invoice, sum);
title 'invoice';
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Instead of repeating with WHERE statement for every value of the variable, is there a way to do this in a different way in one table?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.cars; where origin='Europe';
column (invoice, sum);
title 'invoice';
run; 

proc report data=sashelp.cars; where origin='USA';
column (invoice, sum);
title 'invoice';
run; 

proc report data=sashelp.cars; where origin='Asia';
column (invoice, sum);
title 'invoice';
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 10 Jan 2021 05:45:20 GMT</pubDate>
    <dc:creator>sasworker16</dc:creator>
    <dc:date>2021-01-10T05:45:20Z</dc:date>
    <item>
      <title>PROC REPORT by different groups for summation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-by-different-groups-for-summation/m-p/710416#M218691</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to get &lt;U&gt;&lt;STRONG&gt;summation of a variable by different groups&lt;/STRONG&gt;&lt;/U&gt; using PROC REPORT procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, I want to compute the &lt;U&gt;&lt;STRONG&gt;summation of invoice by origin&lt;/STRONG&gt;&lt;/U&gt; in the &lt;U&gt;&lt;STRONG&gt;sashelp.cars&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.cars; 
column (invoice, sum);
title 'invoice';
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Instead of repeating with WHERE statement for every value of the variable, is there a way to do this in a different way in one table?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=sashelp.cars; where origin='Europe';
column (invoice, sum);
title 'invoice';
run; 

proc report data=sashelp.cars; where origin='USA';
column (invoice, sum);
title 'invoice';
run; 

proc report data=sashelp.cars; where origin='Asia';
column (invoice, sum);
title 'invoice';
run; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Jan 2021 05:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-by-different-groups-for-summation/m-p/710416#M218691</guid>
      <dc:creator>sasworker16</dc:creator>
      <dc:date>2021-01-10T05:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: PROC REPORT by different groups for summation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-by-different-groups-for-summation/m-p/710424#M218695</link>
      <description>proc report data=sashelp.cars nowd; &lt;BR /&gt;column origin invoice;&lt;BR /&gt;define origin/group;&lt;BR /&gt;define invoice/analysis sum;&lt;BR /&gt;title 'invoice';&lt;BR /&gt;run;</description>
      <pubDate>Sun, 10 Jan 2021 10:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-REPORT-by-different-groups-for-summation/m-p/710424#M218695</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-01-10T10:41:23Z</dc:date>
    </item>
  </channel>
</rss>

