<?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: Calculating the average based on different columns for different rows in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-average-based-on-different-columns-for-different/m-p/155735#M262862</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Paige&lt;/P&gt;&lt;P&gt;its working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Nov 2013 14:31:11 GMT</pubDate>
    <dc:creator>Kpatel306</dc:creator>
    <dc:date>2013-11-26T14:31:11Z</dc:date>
    <item>
      <title>Calculating the average based on different columns for different rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-average-based-on-different-columns-for-different/m-p/155733#M262860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone one can help me how can I calculated the average based on different columns for different rows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g:&lt;/P&gt;&lt;P&gt;I want to calculate the field "Average" based on defined column name in "SAvg" to "EAvg":&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in first row I want to calculate the average for row M5 to M10 (i.e. 85,589), in second row M5 to M9 (i.e.154,669), and so forth.&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="733" style="width: 1293px; height: 473px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="49"&gt;Source&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M1&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="63"&gt;M2&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M3&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M4&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M5&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M6&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M7&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M8&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M9&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="70"&gt;M10&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="37"&gt;SAvg&lt;/TD&gt;&lt;TD class="xl65" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="37"&gt;EAvg&lt;/TD&gt;&lt;TD class="xl66" style="border-left-color: currentColor; border-left-width: medium; border-left-style: none;" width="74"&gt; Average &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;Coll1&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 12,547 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 86,417 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 80,289 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 102,858 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 96,533 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 91,042 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 82,901 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 100,368 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 74,033 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 68,658 &lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M5&lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M10&lt;/TD&gt;&lt;TD class="xl70" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;Coll2&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 109,891 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 67,685 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 102,985 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 81,577 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M5&lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M9&lt;/TD&gt;&lt;TD class="xl70" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;Coll3&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 138,245 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 93,213 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 104,059 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 101,874 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 93,213 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M4&lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M8&lt;/TD&gt;&lt;TD class="xl70" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;Coll4&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 102,852 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 99,359 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 101,605 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 98,892 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 93,213 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 99,617 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 83,941 &lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M5&lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M10&lt;/TD&gt;&lt;TD class="xl70" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;Coll5&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 81,481 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 81,481 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 108,522 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 95,261 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 77,686 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 100,531 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 95,412 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 103,649 &lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M4&lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M7&lt;/TD&gt;&lt;TD class="xl70" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top-color: currentColor; border-top-width: medium; border-top-style: none;"&gt;Coll6&lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 65,897 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 86,797 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 82,744 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 138,464 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 107,854 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; 97,684 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 116,621 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl68" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; £ &lt;BR /&gt;&amp;nbsp; 456,987 &lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M2&lt;/TD&gt;&lt;TD class="xl69" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt;M6&lt;/TD&gt;&lt;TD class="xl70" style="border-top-color: currentColor; border-left-color: currentColor; border-top-width: medium; border-left-width: medium; border-top-style: none; border-left-style: none;"&gt; &lt;/TD&gt; &lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;KP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 17:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-average-based-on-different-columns-for-different/m-p/155733#M262860</guid>
      <dc:creator>Kpatel306</dc:creator>
      <dc:date>2013-11-25T17:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the average based on different columns for different rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-average-based-on-different-columns-for-different/m-p/155734#M262861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could do this via data step ARRAY statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UNtested code&lt;/P&gt;&lt;P&gt;&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; array m m1-m10;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; start=substr(savg,2)+0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endd=substr(eavg,2)+0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i=start to endd;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum=sum+m(i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg=sum/(endd-start+1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop i sum start endd;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Nov 2013 17:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-average-based-on-different-columns-for-different/m-p/155734#M262861</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-11-25T17:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the average based on different columns for different rows</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Calculating-the-average-based-on-different-columns-for-different/m-p/155735#M262862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Paige&lt;/P&gt;&lt;P&gt;its working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 14:31:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Calculating-the-average-based-on-different-columns-for-different/m-p/155735#M262862</guid>
      <dc:creator>Kpatel306</dc:creator>
      <dc:date>2013-11-26T14:31:11Z</dc:date>
    </item>
  </channel>
</rss>

