<?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: Showing Only the Last Month in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Showing-Only-the-Last-Month/m-p/202301#M266896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ballardw - Thank you! I actually figured it out right before you posted. I forget that I need to focus on the variable that is causing the duplicates. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2015 18:22:23 GMT</pubDate>
    <dc:creator>emmytheduck</dc:creator>
    <dc:date>2015-07-14T18:22:23Z</dc:date>
    <item>
      <title>Showing Only the Last Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-Only-the-Last-Month/m-p/202299#M266894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey all! I'm quite new to SAS. I am working with a large data set that lists members with their coverage dates. So, if I were a member and I had coverage for the entire year, there are 12 rows for me with 1/1/15, 2/1/15, and so on all the way to December.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show just ONE line for each member. I need it to be the last month of coverage. For most, it will be December. I was told to use "last.incmth" (incmth is the variable). I'm not having any luck, and I don't want to make this too complicated if possible. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 15:35:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-Only-the-Last-Month/m-p/202299#M266894</guid>
      <dc:creator>emmytheduck</dc:creator>
      <dc:date>2015-07-14T15:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Only the Last Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-Only-the-Last-Month/m-p/202300#M266895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually you likely want the last member ID value. A stub of code that should accomplish this is:&lt;/P&gt;&lt;P&gt;If the data is sorted this step isn't needed but just in case:&lt;/P&gt;&lt;P&gt;proc sort data=have; by memberid incmth; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then to get the data you want:&lt;/P&gt;&lt;P&gt;Data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by memberid incmth;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if last.membered;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;IF the data crosses Years and you need the last within each year you would need to add a Year value to use in the by statement: by membered year incmth;&lt;/P&gt;&lt;P&gt;and use last.year to get the last value for each year associated with a member.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 16:34:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-Only-the-Last-Month/m-p/202300#M266895</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-07-14T16:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Showing Only the Last Month</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Showing-Only-the-Last-Month/m-p/202301#M266896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ballardw - Thank you! I actually figured it out right before you posted. I forget that I need to focus on the variable that is causing the duplicates. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Showing-Only-the-Last-Month/m-p/202301#M266896</guid>
      <dc:creator>emmytheduck</dc:creator>
      <dc:date>2015-07-14T18:22:23Z</dc:date>
    </item>
  </channel>
</rss>

