<?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: I want the sum value if id is repeating like in the attachment with proc sql in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/I-want-the-sum-value-if-id-is-repeating-like-in-the-attachment/m-p/329065#M73564</link>
    <description>&lt;P&gt;Post test data in the form of a datastep, and required output. &amp;nbsp;I am not here to type in test data to provide you code.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Feb 2017 12:32:47 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-02-01T12:32:47Z</dc:date>
    <item>
      <title>I want the sum value if id is repeating like in the attachment with proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-the-sum-value-if-id-is-repeating-like-in-the-attachment/m-p/329050#M73559</link>
      <description>&lt;P&gt;&lt;BR /&gt;if ID is &amp;gt; 1 then sum of edate - stdate&lt;BR /&gt;else just retain the edate - stdate in varibale&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13398iEB37D24B6B099FAC/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="support1.PNG" title="support1.PNG" /&gt;</description>
      <pubDate>Wed, 01 Feb 2017 12:00:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-the-sum-value-if-id-is-repeating-like-in-the-attachment/m-p/329050#M73559</guid>
      <dc:creator>SrikanthY</dc:creator>
      <dc:date>2017-02-01T12:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: I want the sum value if id is repeating like in the attachment with proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-the-sum-value-if-id-is-repeating-like-in-the-attachment/m-p/329065#M73564</link>
      <description>&lt;P&gt;Post test data in the form of a datastep, and required output. &amp;nbsp;I am not here to type in test data to provide you code.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 12:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-the-sum-value-if-id-is-repeating-like-in-the-attachment/m-p/329065#M73564</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-02-01T12:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: I want the sum value if id is repeating like in the attachment with proc sql</title>
      <link>https://communities.sas.com/t5/SAS-Programming/I-want-the-sum-value-if-id-is-repeating-like-in-the-attachment/m-p/329097#M73572</link>
      <description>&lt;P&gt;Based on your diagram, this looks like it might do the trick:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;Rvalue=0;&lt;/P&gt;
&lt;P&gt;do until (last.id);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; by id;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Rvalue + (edate - stdate);&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;do until (last.id);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; by id;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; subvalue = edate - stdate;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 14:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/I-want-the-sum-value-if-id-is-repeating-like-in-the-attachment/m-p/329097#M73572</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-02-01T14:08:57Z</dc:date>
    </item>
  </channel>
</rss>

