<?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: Cumulative Sum in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63141#M17953</link>
    <description>In the data step where you read in the data, you need to add one simple command to compute cumulative demand;&lt;BR /&gt;
&lt;BR /&gt;
CAL+DEMAND;</description>
    <pubDate>Tue, 11 Aug 2009 16:03:06 GMT</pubDate>
    <dc:creator>Paige</dc:creator>
    <dc:date>2009-08-11T16:03:06Z</dc:date>
    <item>
      <title>Cumulative Sum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63139#M17951</link>
      <description>I am again posting the same query &lt;BR /&gt;
since am not getting the desired code&lt;BR /&gt;
&lt;BR /&gt;
data is as follows &lt;BR /&gt;
date   meter       demand   cal; &lt;BR /&gt;
1       A             5            5 &lt;BR /&gt;
2       B             10         15 &lt;BR /&gt;
3       C             15         30 &lt;BR /&gt;
4       D             20         50 &lt;BR /&gt;
5       E              25        75 &lt;BR /&gt;
6       F              30        105 &lt;BR /&gt;
7       G              35        140 &lt;BR /&gt;
8       H             40       180 &lt;BR /&gt;
&lt;BR /&gt;
in this table &lt;BR /&gt;
there are three variables and "cal" is the result i require &lt;BR /&gt;
so &lt;BR /&gt;
i need the code such as i get the cumulative sum as shown in "Cal" &lt;BR /&gt;
my input are date,meter(charachter) and demand and i need "cal" which &lt;BR /&gt;
is shown in the table &lt;BR /&gt;
and i need to sort it by meter and date &lt;BR /&gt;
like for meter A (date 1 to &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; its "cal" &lt;BR /&gt;
then meter B (date 1 to &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt; its "cal" &lt;BR /&gt;
so, please do reply if u have an answer for this query &lt;BR /&gt;
thanks</description>
      <pubDate>Tue, 11 Aug 2009 13:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63139#M17951</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-08-11T13:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63140#M17952</link>
      <description>Explore the use (and output file) for PROC FREQ for this purpose.  SAS generates variables with unique names (see the DOC) and so you need only to rename the output variable, if required.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Base SAS(R) 9.2 Procedures Guide: Statistical Procedures, PROC FREQ&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/procstat/59629/HTML/default/freq_toc.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/procstat/59629/HTML/default/freq_toc.htm&lt;/A&gt;</description>
      <pubDate>Tue, 11 Aug 2009 14:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63140#M17952</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-11T14:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63141#M17953</link>
      <description>In the data step where you read in the data, you need to add one simple command to compute cumulative demand;&lt;BR /&gt;
&lt;BR /&gt;
CAL+DEMAND;</description>
      <pubDate>Tue, 11 Aug 2009 16:03:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63141#M17953</guid>
      <dc:creator>Paige</dc:creator>
      <dc:date>2009-08-11T16:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Cumulative Sum</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63142#M17954</link>
      <description>With the DATA step technique, there will be BY variable list and using IF FIRST.&lt;BREAK_VAR_NAME&gt;  considerations - not the case when using the PROC approach.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;/BREAK_VAR_NAME&gt;</description>
      <pubDate>Tue, 11 Aug 2009 16:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Cumulative-Sum/m-p/63142#M17954</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-08-11T16:20:54Z</dc:date>
    </item>
  </channel>
</rss>

