<?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: Summarizing data as per month in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Summarizing-data-as-per-month/m-p/75698#M21970</link>
    <description>Thank You Pznew....&lt;BR /&gt;
&lt;BR /&gt;
same thing i did by using retain statement in DI studio.,&lt;BR /&gt;
&lt;BR /&gt;
its Good alternative for Me....both are working fine......&lt;BR /&gt;
&lt;BR /&gt;
once again Thanks......</description>
    <pubDate>Fri, 27 Feb 2009 12:38:53 GMT</pubDate>
    <dc:creator>venkatesh</dc:creator>
    <dc:date>2009-02-27T12:38:53Z</dc:date>
    <item>
      <title>Summarizing data as per month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summarizing-data-as-per-month/m-p/75696#M21968</link>
      <description>Hi all.,&lt;BR /&gt;
&lt;BR /&gt;
I Have a data set with variable like&lt;BR /&gt;
&lt;BR /&gt;
empid, salary, salary2, date mmddyy10.;&lt;BR /&gt;
101 15000 16000 10/11/2006&lt;BR /&gt;
101 20000 25000 10/12/2006&lt;BR /&gt;
101  5000  2500 10/12/2006&lt;BR /&gt;
101 15600 18000 11/09/2006&lt;BR /&gt;
101 16000 12500 11/12/2006&lt;BR /&gt;
&lt;BR /&gt;
....&lt;BR /&gt;
....&lt;BR /&gt;
...&lt;BR /&gt;
&lt;BR /&gt;
here i required the output as &lt;BR /&gt;
&lt;BR /&gt;
101 40000 43500 10/11/2006&lt;BR /&gt;
101 31600 30500 11/09/2006&lt;BR /&gt;
.....&lt;BR /&gt;
....&lt;BR /&gt;
&lt;BR /&gt;
according to the month wise need to add salary1 and salary2 variables and displayed at startingdate of the each observation.(here month 10 two times and month 11 two times....i have nearly 3000 records....in a single year...)&lt;BR /&gt;
&lt;BR /&gt;
i can use all the three Base Sas, Di Studio and Enterprise Guide.....&lt;BR /&gt;
&lt;BR /&gt;
Help would be a great....&lt;BR /&gt;
&lt;BR /&gt;
Venkatesh.</description>
      <pubDate>Fri, 27 Feb 2009 09:53:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summarizing-data-as-per-month/m-p/75696#M21968</guid>
      <dc:creator>venkatesh</dc:creator>
      <dc:date>2009-02-27T09:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing data as per month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summarizing-data-as-per-month/m-p/75697#M21969</link>
      <description>Try this...&lt;BR /&gt;
&lt;BR /&gt;
This code reads in the data, but notice i create a month variable to be the month of the date.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data emps;&lt;BR /&gt;
format date mmddyy10.;&lt;BR /&gt;
input empid salary salary2 date mmddyy10.;&lt;BR /&gt;
month=month(date);&lt;BR /&gt;
cards;&lt;BR /&gt;
101 15000 16000 10/11/2006&lt;BR /&gt;
101 20000 25000 10/12/2006&lt;BR /&gt;
101 5000 2500 10/12/2006&lt;BR /&gt;
101 15600 18000 11/09/2006&lt;BR /&gt;
101 16000 12500 11/12/2006&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Then use a proc means to find the summarised values. Note the NWAY option to get only the highest level of combinations and the IDMIN which will take the minimum value of the ID vairable (as opposed to the maximum which is the default). Us the month vairable as the class variable as well as the employee id and drop the month variable along with the automatic variables.&lt;BR /&gt;
&lt;BR /&gt;
proc means data=emps noprint nway idmin;&lt;BR /&gt;
class empid month;&lt;BR /&gt;
id date;&lt;BR /&gt;
var salary salary2;&lt;BR /&gt;
output out=tots(drop=_type_ _freq_ month) sum= ;&lt;BR /&gt;
run;</description>
      <pubDate>Fri, 27 Feb 2009 10:53:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summarizing-data-as-per-month/m-p/75697#M21969</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-27T10:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing data as per month</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Summarizing-data-as-per-month/m-p/75698#M21970</link>
      <description>Thank You Pznew....&lt;BR /&gt;
&lt;BR /&gt;
same thing i did by using retain statement in DI studio.,&lt;BR /&gt;
&lt;BR /&gt;
its Good alternative for Me....both are working fine......&lt;BR /&gt;
&lt;BR /&gt;
once again Thanks......</description>
      <pubDate>Fri, 27 Feb 2009 12:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Summarizing-data-as-per-month/m-p/75698#M21970</guid>
      <dc:creator>venkatesh</dc:creator>
      <dc:date>2009-02-27T12:38:53Z</dc:date>
    </item>
  </channel>
</rss>

