<?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: how to compute average of the given values for the last three years repeatedly? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-compute-average-of-the-given-values-for-the-last-three/m-p/580624#M164949</link>
    <description>You likely want an array but the coding should be pretty straightforward with an array. Have you tried an array solution yet? It would help if you can provide some data as a data step. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-arrays/arrays-in-sas/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-arrays/arrays-in-sas/&lt;/A&gt;</description>
    <pubDate>Mon, 12 Aug 2019 18:14:14 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-08-12T18:14:14Z</dc:date>
    <item>
      <title>how to compute average of the given values for the last three years repeatedly?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-compute-average-of-the-given-values-for-the-last-three/m-p/580621#M164948</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;Greetings of the day&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp; the quarterly data of a variable from june,2009 to march, 2018.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with those values, i have to compute the average value of the variable for the previous three years.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, at the end of march, 2012, i have to compute the average value of the variable from june,2009 to march,2012.&lt;/P&gt;&lt;P&gt;Next at the end of march, 2013,&amp;nbsp;i have to compute the average value of the variable from june,2010 to march,2013. and so on&amp;nbsp; till march, 2018.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the format of my dataset is as follows&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Company Name&lt;/TD&gt;&lt;TD&gt;var_june2009&lt;/TD&gt;&lt;TD&gt;var_sept2009&lt;/TD&gt;&lt;TD&gt;var_dec2009&lt;/TD&gt;&lt;TD&gt;var_march2010&lt;/TD&gt;&lt;TD&gt;................&lt;/TD&gt;&lt;TD&gt;var_march2018&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;20 Microns Ltd.&lt;/TD&gt;&lt;TD&gt;2.05&lt;/TD&gt;&lt;TD&gt;2.05&lt;/TD&gt;&lt;TD&gt;0.46&lt;/TD&gt;&lt;TD&gt;0.29&lt;/TD&gt;&lt;TD&gt;..............&lt;/TD&gt;&lt;TD&gt;0.29&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3I Infotech Ltd.&lt;/TD&gt;&lt;TD&gt;4.41&lt;/TD&gt;&lt;TD&gt;7.74&lt;/TD&gt;&lt;TD&gt;16.59&lt;/TD&gt;&lt;TD&gt;8.08&lt;/TD&gt;&lt;TD&gt;...............&lt;/TD&gt;&lt;TD&gt;8.22&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3M India Ltd.&lt;/TD&gt;&lt;TD&gt;5.92&lt;/TD&gt;&lt;TD&gt;5.88&lt;/TD&gt;&lt;TD&gt;5.42&lt;/TD&gt;&lt;TD&gt;5.33&lt;/TD&gt;&lt;TD&gt;...............&lt;/TD&gt;&lt;TD&gt;5.14&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help me writing the SAS code to perform the above mentioned calculation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 18:08:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-compute-average-of-the-given-values-for-the-last-three/m-p/580621#M164948</guid>
      <dc:creator>srikanthyadav44</dc:creator>
      <dc:date>2019-08-12T18:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to compute average of the given values for the last three years repeatedly?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-compute-average-of-the-given-values-for-the-last-three/m-p/580624#M164949</link>
      <description>You likely want an array but the coding should be pretty straightforward with an array. Have you tried an array solution yet? It would help if you can provide some data as a data step. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/seminars/sas-arrays/arrays-in-sas/" target="_blank"&gt;https://stats.idre.ucla.edu/sas/seminars/sas-arrays/arrays-in-sas/&lt;/A&gt;</description>
      <pubDate>Mon, 12 Aug 2019 18:14:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-compute-average-of-the-given-values-for-the-last-three/m-p/580624#M164949</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-12T18:14:14Z</dc:date>
    </item>
  </channel>
</rss>

