<?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 Condensing data sets in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44287#M11700</link>
    <description>Hi, I have a question on condensing data sets.&lt;BR /&gt;
&lt;BR /&gt;
For example, how do I change this dataset:&lt;BR /&gt;
&lt;BR /&gt;
ID Deposit&lt;BR /&gt;
1    100&lt;BR /&gt;
1    150&lt;BR /&gt;
2    50&lt;BR /&gt;
2    50&lt;BR /&gt;
2    50&lt;BR /&gt;
3    75&lt;BR /&gt;
&lt;BR /&gt;
Into this:&lt;BR /&gt;
ID  Deposit&lt;BR /&gt;
1   250&lt;BR /&gt;
2   150&lt;BR /&gt;
3    75&lt;BR /&gt;
&lt;BR /&gt;
I am sorting the dataset by ID and I know I might have to use the first. and last. functions, but I'm new to SAS and I can't come up with a solution.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be appreciated.</description>
    <pubDate>Thu, 21 Jan 2010 15:48:30 GMT</pubDate>
    <dc:creator>shukuchi</dc:creator>
    <dc:date>2010-01-21T15:48:30Z</dc:date>
    <item>
      <title>Condensing data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44287#M11700</link>
      <description>Hi, I have a question on condensing data sets.&lt;BR /&gt;
&lt;BR /&gt;
For example, how do I change this dataset:&lt;BR /&gt;
&lt;BR /&gt;
ID Deposit&lt;BR /&gt;
1    100&lt;BR /&gt;
1    150&lt;BR /&gt;
2    50&lt;BR /&gt;
2    50&lt;BR /&gt;
2    50&lt;BR /&gt;
3    75&lt;BR /&gt;
&lt;BR /&gt;
Into this:&lt;BR /&gt;
ID  Deposit&lt;BR /&gt;
1   250&lt;BR /&gt;
2   150&lt;BR /&gt;
3    75&lt;BR /&gt;
&lt;BR /&gt;
I am sorting the dataset by ID and I know I might have to use the first. and last. functions, but I'm new to SAS and I can't come up with a solution.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be appreciated.</description>
      <pubDate>Thu, 21 Jan 2010 15:48:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44287#M11700</guid>
      <dc:creator>shukuchi</dc:creator>
      <dc:date>2010-01-21T15:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Condensing data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44288#M11701</link>
      <description>Proc sql;&lt;BR /&gt;
select id, sum(deposit) deposit from xxx group by id;&lt;BR /&gt;
quit;</description>
      <pubDate>Thu, 21 Jan 2010 15:50:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44288#M11701</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2010-01-21T15:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Condensing data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44289#M11702</link>
      <description>Or.&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc summary data=INDATA nway missing;&lt;BR /&gt;
class ID; * group var;&lt;BR /&gt;
var DEPOSIT; * statistic var;&lt;BR /&gt;
output out=OUTDATA sum= (drop=_TYPE_ _FREQ_);&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Cheers from Portugal&lt;BR /&gt;
&lt;BR /&gt;
Daniel Santos @ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;</description>
      <pubDate>Thu, 21 Jan 2010 16:36:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44289#M11702</guid>
      <dc:creator>DanielSantos</dc:creator>
      <dc:date>2010-01-21T16:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Condensing data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44290#M11703</link>
      <description>or:&lt;BR /&gt;
proc sort data=xxx nodup;&lt;BR /&gt;
 by id;&lt;BR /&gt;
run;</description>
      <pubDate>Thu, 21 Jan 2010 17:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44290#M11703</guid>
      <dc:creator>abdullala</dc:creator>
      <dc:date>2010-01-21T17:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Condensing data sets</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44291#M11704</link>
      <description>ah, misunderstood the request. ignore please!!!</description>
      <pubDate>Thu, 21 Jan 2010 18:00:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Condensing-data-sets/m-p/44291#M11704</guid>
      <dc:creator>abdullala</dc:creator>
      <dc:date>2010-01-21T18:00:28Z</dc:date>
    </item>
  </channel>
</rss>

