<?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 identifying observations 12 month period in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/identifying-observations-12-month-period/m-p/277230#M55639</link>
    <description>&lt;P&gt;I can't find an example using a DATA step with multiple SET statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to find previous 12 months observations based off a DATETIME value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm pulling previous month easily by:&lt;/P&gt;
&lt;P&gt;MONTH(DATEPART(DATETIME)) = MONTH(TODAY() -1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I remember running across an example before but cannot find it.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2016 13:52:17 GMT</pubDate>
    <dc:creator>G_I_Jeff</dc:creator>
    <dc:date>2016-06-14T13:52:17Z</dc:date>
    <item>
      <title>identifying observations 12 month period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-observations-12-month-period/m-p/277230#M55639</link>
      <description>&lt;P&gt;I can't find an example using a DATA step with multiple SET statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to find previous 12 months observations based off a DATETIME value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm pulling previous month easily by:&lt;/P&gt;
&lt;P&gt;MONTH(DATEPART(DATETIME)) = MONTH(TODAY() -1);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I remember running across an example before but cannot find it.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 13:52:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-observations-12-month-period/m-p/277230#M55639</guid>
      <dc:creator>G_I_Jeff</dc:creator>
      <dc:date>2016-06-14T13:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: identifying observations 12 month period</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-observations-12-month-period/m-p/277236#M55640</link>
      <description>&lt;P&gt;Its quite hard to see what your after from that, test data in the form of a datastep and what you want out will help. &amp;nbsp;Can you not sort the data, then use lag()? &amp;nbsp;SQL can simply merge these too. &amp;nbsp;If its an agregate then a where might be better.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2016 14:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-observations-12-month-period/m-p/277236#M55640</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-06-14T14:05:48Z</dc:date>
    </item>
  </channel>
</rss>

