<?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 lag in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137865#M261297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached a file with some code.&amp;nbsp; I would like to get the equivalent to =B3+C3-D2-G2 in excel but my code is not performing the way that I want it too.&amp;nbsp; I'm not sure if lag what I should be using here.&amp;nbsp; Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Dec 2014 15:35:02 GMT</pubDate>
    <dc:creator>Steelers_In_DC</dc:creator>
    <dc:date>2014-12-05T15:35:02Z</dc:date>
    <item>
      <title>lag</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137865#M261297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached a file with some code.&amp;nbsp; I would like to get the equivalent to =B3+C3-D2-G2 in excel but my code is not performing the way that I want it too.&amp;nbsp; I'm not sure if lag what I should be using here.&amp;nbsp; Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 15:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137865#M261297</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-12-05T15:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: lag</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137866#M261298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LAG has some pretty complex relationships with conditional execution.&lt;/P&gt;&lt;P&gt;You would be better to create a new variable such as Lpayment= lag(payment); BEFORE the IF not line of code and use Lpayment instead of lag(payment) within the calculation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 15:42:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137866#M261298</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-12-05T15:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: lag</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137867#M261299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do not confuse the queue function with the lag function.&lt;/P&gt;&lt;P&gt;There is no complexity when you understand that what SAS has implemented is a QUEUE &lt;A href="http://en.wikipedia.org/wiki/Queue_(abstract_data_type"&gt;http://en.wikipedia.org/wiki/Queue_(abstract_data_type&lt;/A&gt;)&amp;nbsp; and has named that wrong as LAG &lt;A class="active_link" href="http://msdn.microsoft.com/en-us/library/hh231256.aspx"&gt;http://msdn.microsoft.com/en-us/library/hh231256.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Wrong naming can cause confusions, correct that and it will become easy.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 16:33:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137867#M261299</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-12-05T16:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: lag</title>
      <link>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137868#M261300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before the IF NOT line payment has no value, I'm putting it after the if not and after the payment = statement.&amp;nbsp; That seems to get me the output I am looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2014 17:19:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/lag/m-p/137868#M261300</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-12-05T17:19:07Z</dc:date>
    </item>
  </channel>
</rss>

