<?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 Calculate in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166375#M43096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to calculate mean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Sep 2014 17:47:35 GMT</pubDate>
    <dc:creator>mmm3902</dc:creator>
    <dc:date>2014-09-30T17:47:35Z</dc:date>
    <item>
      <title>Calculate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166375#M43096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how to calculate mean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 17:47:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166375#M43096</guid>
      <dc:creator>mmm3902</dc:creator>
      <dc:date>2014-09-30T17:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Average of Statistic Before and After Event</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166376#M43097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I may be reading this incorrectly but I think your request has a logical flaw.&amp;nbsp; Read your bullet point 2 and 3. You are saying the same logic flags both indicator and indicator_prev, so they would logically do the same thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you trying to figure out the 3 year average before the event, and the three year average after the event, where if the events share years it's considered a 'before' category? That's what i'm understanding from your question, let me know if I'm off track.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 20:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166376#M43097</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2014-09-30T20:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Average of Statistic Before and After Event</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166377#M43098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Haha okay I was thinking there was something you weren't saying that made it more of a challenge!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SO the next logical question is. What happens if events occur within 3 years of eachother? Then a 3 year lag doesn't make sense...&amp;nbsp; Would the 'last 3 years look back' only be the number of available years since the last event?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the lookforward and lookback are the maximum between (number of years between events,3)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would start by making a year spine that joins between the minimum and maximum value of the actual years given -3(+3), and the minimum event -3(maximum +3)&amp;nbsp; per each of your event codes.&amp;nbsp; For example, for company #3 it would be 1998-3 (since that's your minimum event -3). and it would go all the way to 2005 (max of years and events for 003 is '2002', and +3= 2005).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you have that, left join both your events table, and your year spine table onto the spine.&amp;nbsp; Then you can use retain statements to retain the last event down row by row until it reaches the next event. Grab a counter of the number of retains you had to make (that's your 'years since').&amp;nbsp;&amp;nbsp; Do the same thing on a reverse sort order, and that's your 'years before'.&amp;nbsp; Then you have all of the columns necessary to do summary information by event, by any "x" year window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if that doesn't make sense at any level.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Sep 2014 21:24:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166377#M43098</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2014-09-30T21:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166378#M43099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Deleting a question is considered bad form.&amp;nbsp; If its incorrect, edit it but don't delete it, its a waste of other users time. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 19:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166378#M43099</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-10-01T19:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166379#M43100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps it was a homework question?&amp;nbsp; This is Google's cache of what mmm3902 originally posted:&lt;/P&gt;&lt;P&gt;----------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Data1:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Company_Code&lt;/LI&gt;&lt;LI&gt;Event&lt;/LI&gt;&lt;LI&gt;Event_Year&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Data2:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Company_Code&lt;/LI&gt;&lt;LI&gt;Year&lt;/LI&gt;&lt;LI&gt;Statistic&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Data1&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: none; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;TBODY style="font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Company_Code&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Event&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Event_Year&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2000&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;002&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;003&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;1998&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;004&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;0&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;.&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Data 2&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="0" cellspacing="0" style="border: none; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;TBODY style="font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Company_Code&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Year&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;Statistic&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;1999&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;60&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;55&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2002&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;60&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2003&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;36&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2004&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;12&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2005&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;12&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;003&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;1999&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;60&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;003&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;60&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;003&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2002&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;55&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;004&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2000&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;36&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="padding: 0 5.4pt; border: 1pt solid windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;004&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;2005&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 0 5.4pt; border-right-width: 1pt; border-bottom-width: 1pt; border-style: none solid solid none; border-right-color: windowtext; border-bottom-color: windowtext; font-style: inherit; font-family: inherit;" valign="top"&gt;&lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;60&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I need to program where for each Company_code in Dataset1; I look for the same Company_code in Dataset2.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;The following should all go into Dataset1:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Compare Event_year (Dataset1) to Year (Dataset2).&lt;/LI&gt;&lt;LI&gt;If Event_year (Dataset1) &amp;gt; Year (Dataset2); INDICATOR =1; else INDICATOR=0;&lt;/LI&gt;&lt;LI&gt;If Event_year(Dataset1) &amp;gt; Year (Dataset2); INDICATOR_PREV =1; else INDICATOR_PREV=0;&lt;/LI&gt;&lt;LI&gt;For INDICATOR =1, calculate SUM(Statistic)&lt;/LI&gt;&lt;LI&gt;For INDICATOR_PREV, calculate SUM(Statistic)&lt;/LI&gt;&lt;LI&gt;For 3 years prior to each event for each company in Dataset 1, calculate corresponding average of STATISTIC.&lt;/LI&gt;&lt;LI&gt;For 3 years after each event in Dataset for each company in Dataset 1, calculate corresponding average of STATISTIC.&lt;/LI&gt;&lt;/UL&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Any help on this would be appreciated! I've taken on a bit more than I could handle right now and am hoping for some guidance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 04:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Calculate/m-p/166379#M43100</guid>
      <dc:creator>dkb</dc:creator>
      <dc:date>2014-10-02T04:33:26Z</dc:date>
    </item>
  </channel>
</rss>

