<?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: Conditionally summing over fields in a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389084#M93299</link>
    <description>&lt;P&gt;Many thanks Astounding.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2017 11:21:02 GMT</pubDate>
    <dc:creator>brophymj</dc:creator>
    <dc:date>2017-08-18T11:21:02Z</dc:date>
    <item>
      <title>Conditionally summing over fields in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389076#M93295</link>
      <description>&lt;P&gt;I have a dataset like the one below where one of the fields is latest (which indicates the latest year). I want to calculate the reported losses (rl) for the 2 and 5 year before the latest year. So, for the first row, the 2 year figures would be rl_2015 + rl_2016 and the 5 year would be&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;rl_2012 + rl_2013&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;+&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;rl_2014 + &lt;/SPAN&gt;&lt;SPAN&gt;rl_2015 + rl_2016.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If the latest year was the same for every row this would be very straightforward but it varies so I need to put in some conditional sum based on the latest year. Id there a way to sum based on the value of "Latest" in a row.i.e.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%let x = latest;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;rl_2yr = rl_&amp;amp;latest + rl_(&amp;amp;latest-1).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;within a datastep,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 816pt;" border="0" summary="Page Layout" width="1088" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="17" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;class&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;policyno&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;latest&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;gwp_2011&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;rl_2011&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;gwp_2012&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;rl_2012&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;gwp_2013&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;rl_2013&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;gwp_2014&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;rl_2014&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;gwp_2015&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;rl_2015&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;gwp_2016&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;rl_2016&lt;/TD&gt;
&lt;TD width="64" class="xl66" style="border-left: none; width: 48pt;"&gt;gwp_2017&lt;/TD&gt;
&lt;TD width="64" class="xl67" style="border-left: none; width: 48pt;"&gt;rl_2017&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl68" style="height: 15.0pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;10&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2016&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;12,736.27&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;1663.46&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;15,397.14&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;48108.36&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;19,796.19&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;5306.15&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;27,873.91&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;120494.3&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl69" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl68" style="height: 15.0pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;144&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2017&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,279.05&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,255.24&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,255.24&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,542.86&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl69" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl68" style="height: 15.0pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;235&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2016&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,825.71&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,876.19&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,912.38&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,047.62&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl69" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl68" style="height: 15.0pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;253&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2016&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;3,066.67&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,792.70&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;8700&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;3,340.00&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;3,488.57&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;4,049.52&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl69" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl68" style="height: 15.0pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;282&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2016&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;685.71&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;380&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;685.71&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;20168.29&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,276.19&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,921.90&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,633.33&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl69" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl68" style="height: 15.0pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;285&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2016&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;3,059.60&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,509.98&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;3,683.33&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;5,321.53&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl69" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl68" style="height: 15.0pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;335&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2017&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,780.95&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,780.95&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,780.95&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;1,980.00&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl69" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl68" style="height: 15.0pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;388&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2017&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,100.00&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;2,907.67&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;2662.61&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;6,671.50&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl64" style="border-top: none; border-left: none; width: 48pt;"&gt;10,685.71&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;35900&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl69" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.75pt;"&gt;
&lt;TD width="64" height="21" class="xl70" style="height: 15.75pt; border-top: none; width: 48pt;"&gt;ARA&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;39&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;2016&lt;/TD&gt;
&lt;TD width="64" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl72" style="border-top: none; border-left: none; width: 48pt;"&gt;2,420.95&lt;/TD&gt;
&lt;TD width="64" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl72" style="border-top: none; border-left: none; width: 48pt;"&gt;3,025.71&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;373&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl72" style="border-top: none; border-left: none; width: 48pt;"&gt;3,528.10&lt;/TD&gt;
&lt;TD width="64" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" align="right" class="xl72" style="border-top: none; border-left: none; width: 48pt;"&gt;3,130.95&lt;/TD&gt;
&lt;TD width="64" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl71" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;TD width="64" class="xl73" style="border-top: none; border-left: none; width: 48pt;"&gt;.&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 18 Aug 2017 10:42:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389076#M93295</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2017-08-18T10:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally summing over fields in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389081#M93296</link>
      <description>&lt;P&gt;No macro language needed ... within a DATA step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;array values {2011:2017} rl_2011 - rl_2017;&lt;/P&gt;
&lt;P&gt;rl_2yr = values{latest} + values{latest-1};&lt;/P&gt;
&lt;P&gt;rl_5yr = values{latest} + values{latest-1} + values{latest-2} + values{latest-3} + values{latest-4};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There may be a way to abbreviate that final statement, but I'm not able to test that right now.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 10:53:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389081#M93296</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-08-18T10:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally summing over fields in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389084#M93299</link>
      <description>&lt;P&gt;Many thanks Astounding.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 11:21:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389084#M93299</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2017-08-18T11:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionally summing over fields in a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389099#M93300</link>
      <description>&lt;P&gt;Many thanks Astounding.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 12:55:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Conditionally-summing-over-fields-in-a-dataset/m-p/389099#M93300</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2017-08-18T12:55:05Z</dc:date>
    </item>
  </channel>
</rss>

