<?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 Group by sum in proc summary in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728668#M35338</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.prdsal2 print ;
class county month product actual_sales;
var  year;
output out= prdsales actual_sales sum=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anandkvn_0-1616566121650.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56383i815A6217D9CFE8DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Anandkvn_0-1616566121650.png" alt="Anandkvn_0-1616566121650.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Mar 2021 06:09:41 GMT</pubDate>
    <dc:creator>BrahmanandaRao</dc:creator>
    <dc:date>2021-03-24T06:09:41Z</dc:date>
    <item>
      <title>Group by sum in proc summary</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728668#M35338</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=sashelp.prdsal2 print ;
class county month product actual_sales;
var  year;
output out= prdsales actual_sales sum=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Anandkvn_0-1616566121650.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56383i815A6217D9CFE8DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Anandkvn_0-1616566121650.png" alt="Anandkvn_0-1616566121650.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 06:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728668#M35338</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2021-03-24T06:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Group by sum in proc summary</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728669#M35339</link>
      <description>&lt;P&gt;I am quite unclear regarding what you are trying to achieve here. OUT= option of the OUTPUT statement is meant to output the created data set by the SUMMARY procedure. Adding to it, the "ACTUAL_SALES" variable does not exist in the data set&amp;nbsp;sashelp.prdsal2, and therefore the error message. Use the below, or better yet, the SQL procedure.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc means data=sashelp.prdsal2 nway sum;
class county month product;
var  actual;
output out= prdsales (drop=_type_ _freq_) sum= / autoname;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Mar 2021 06:18:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728669#M35339</guid>
      <dc:creator>qoit</dc:creator>
      <dc:date>2021-03-24T06:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Group by sum in proc summary</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728672#M35340</link>
      <description>Actual sales variable in prdsal2 dataset why it shows error variable not found</description>
      <pubDate>Wed, 24 Mar 2021 06:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728672#M35340</guid>
      <dc:creator>BrahmanandaRao</dc:creator>
      <dc:date>2021-03-24T06:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Group by sum in proc summary</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728674#M35341</link>
      <description>&lt;P&gt;What is the question here?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 06:42:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728674#M35341</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-03-24T06:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Group by sum in proc summary</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728695#M35343</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/265860"&gt;@BrahmanandaRao&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Actual sales variable in prdsal2 dataset why it shows error variable not found&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;The variable is positively NOT there:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select name from dictionary.columns
where libname ="SASHELP" and memname = "PRDSAL2";
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;Column Name
COUNTRY
STATE
COUNTY
ACTUAL
PREDICT
PRODTYPE
PRODUCT
YEAR
QUARTER
MONTH
MONYR&lt;/PRE&gt;
&lt;P&gt;You may have meant to use ACTUAL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When SAS tells you something ain't there, while you think otherwise, then it's always YOU who's in error.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 09:21:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728695#M35343</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-24T09:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Group by sum in proc summary</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728757#M35348</link>
      <description>&lt;P&gt;A random variable name on the OUTPUT statement is going to throw an error if not used properly.&lt;/P&gt;
&lt;P&gt;In your picture the variable name underlined has no context.&lt;/P&gt;
&lt;P&gt;All those "expected" are Statistics or the option specifier / . Statistics, associated variables and variable names are expected. But at name without context in one of those places is invalid.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are creating a statistic for a specific variable you use statistic(variablename(s))= &amp;lt;name of new variable(s) if desired&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 14:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Group-by-sum-in-proc-summary/m-p/728757#M35348</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-24T14:08:10Z</dc:date>
    </item>
  </channel>
</rss>

