<?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 Assistance with Proc Summary in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399446#M66628</link>
    <description>Hi there. 
Im struggling a little bit with a proc summary. 

I have a large data set that holds 3 variables: an IDNumber(Char) a date (date format) and a value (200.00) the whole period covers March to August I'm trying to summarise it so it outputs an average value per IDNumber for each month. I'd like the table in the following way:- 

Ive attached a sample table of how im trying to make the sample look</description>
    <pubDate>Thu, 28 Sep 2017 10:26:43 GMT</pubDate>
    <dc:creator>Stretlow</dc:creator>
    <dc:date>2017-09-28T10:26:43Z</dc:date>
    <item>
      <title>Assistance with Proc Summary</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399446#M66628</link>
      <description>Hi there. 
Im struggling a little bit with a proc summary. 

I have a large data set that holds 3 variables: an IDNumber(Char) a date (date format) and a value (200.00) the whole period covers March to August I'm trying to summarise it so it outputs an average value per IDNumber for each month. I'd like the table in the following way:- 

Ive attached a sample table of how im trying to make the sample look</description>
      <pubDate>Thu, 28 Sep 2017 10:26:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399446#M66628</guid>
      <dc:creator>Stretlow</dc:creator>
      <dc:date>2017-09-28T10:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Proc Summary</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399450#M66629</link>
      <description>&lt;P&gt;if yo like a report you can use the tabulate procedure followed by a transpose:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;tabulate&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=one &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=two;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; idnumber month;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; idnumber, month*value*mean;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; value;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;transpose&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=two &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;out&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=three;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; idnumber;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;id&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; month;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;var&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; value_Mean;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;//Fredrik&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 10:54:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399450#M66629</guid>
      <dc:creator>FredrikE</dc:creator>
      <dc:date>2017-09-28T10:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Proc Summary</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399471#M66631</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the response this is working perfectly thank you, clearly I was failing as I was using the wrong procedure !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Last question if I may, if I wanted the same table but summed instead of mean would it be this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc tabulate data=ZFinal out=Output;&lt;BR /&gt;class FDAccountNumber Month;&lt;BR /&gt;table FDAccountNumber, Month*Amount;&lt;BR /&gt;var Amount;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 12:55:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399471#M66631</guid>
      <dc:creator>Stretlow</dc:creator>
      <dc:date>2017-09-28T12:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Proc Summary</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399480#M66634</link>
      <description>&lt;P&gt;PROC SUMMARY should be able to do this as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc summary data=have nway;
    class IDNumber Date;
    format date monyy.;
    var value;
    output out=want mean=meanvalue;
run;
    &amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 14:52:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Assistance-with-Proc-Summary/m-p/399480#M66634</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-09-28T14:52:08Z</dc:date>
    </item>
  </channel>
</rss>

