<?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: Generating rolling 12 month totals for multiple industry codes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293726#M61203</link>
    <description>&lt;P&gt;Sort by industry codes and months. Use "by code;" in the data step.&lt;/P&gt;
&lt;P&gt;Instead of using _n_, create your own counter (reatain!) that is reset whenever the industry code changes (first.code); you might also clear your array at that point.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2016 14:06:55 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-08-24T14:06:55Z</dc:date>
    <item>
      <title>Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293717#M61201</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to generate 12 month rolling totals for bankruptcy counts for multiple&amp;nbsp;industry codes. &amp;nbsp;This is what my data looks like for one of those industry codes:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4692i55F8753BD01E7C3D/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Raw_Data.PNG" title="Raw_Data.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the following code which gives me a running 12-month total for the selected code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;************************************&lt;BR /&gt;%let roll_num = 12;&lt;BR /&gt;data new;&lt;BR /&gt;set newview;&lt;BR /&gt;array summed[&amp;amp;roll_num] _temporary_;&lt;/P&gt;&lt;P&gt;if E = &amp;amp;roll_num then E = 1;&lt;BR /&gt;else E + 1;&lt;BR /&gt;summed[E] = Bankruptcy_CA;&lt;BR /&gt;if _N_ &amp;gt;= &amp;amp;roll_num then do;&lt;BR /&gt;CA_CT = sum(of summed[*]); * CT means cumulative total;&lt;BR /&gt;end;&lt;BR /&gt;format CA_CT comma8.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;**********************&lt;/P&gt;&lt;P&gt;Which gives me the desired rolling totals:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/4693i6EE440E85A1FB7FB/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Raw1.PNG" title="Raw1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new series is called 'CA_CT'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question: How do I code this so I can add more than 1 code (I have 600+) so I can generate the kind of rolling totals shown above? &amp;nbsp;If I add more industry codes&amp;nbsp;to the existing SAS program the rolling totals don't generate properly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I modify the code above? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Jack&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 13:56:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293717#M61201</guid>
      <dc:creator>Jack1</dc:creator>
      <dc:date>2016-08-24T13:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293724#M61202</link>
      <description>&lt;P&gt;Check if you have proc expand, if so look at convert statement.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 14:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293724#M61202</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-24T14:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293726#M61203</link>
      <description>&lt;P&gt;Sort by industry codes and months. Use "by code;" in the data step.&lt;/P&gt;
&lt;P&gt;Instead of using _n_, create your own counter (reatain!) that is reset whenever the industry code changes (first.code); you might also clear your array at that point.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 14:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293726#M61203</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-24T14:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293759#M61212</link>
      <description>&lt;P&gt;These links might help you&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sas-programming.com/2015/05/fast-sql-moving-average-calculation.html" target="_blank"&gt;http://www.sas-programming.com/2015/05/fast-sql-moving-average-calculation.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.ats.ucla.edu/stat/sas/faq/creating_tiimeseries_variables_proc_expand.htm" target="_blank"&gt;http://www.ats.ucla.edu/stat/sas/faq/creating_tiimeseries_variables_proc_expand.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;have a look through them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 15:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293759#M61212</guid>
      <dc:creator>rahul88888</dc:creator>
      <dc:date>2016-08-24T15:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293800#M61228</link>
      <description>&lt;P&gt;Thanks. &amp;nbsp;Makes sense. &amp;nbsp;In your statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Instead of using _n_, create your own counter (reatain!) that is reset whenever the industry code changes (first.code); you might also clear your array at that point.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How would I modify my code above to get the desired outcome? &amp;nbsp;I am fairly new to SAS coding. &amp;nbsp;Thanks again....&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2016 18:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293800#M61228</guid>
      <dc:creator>Jack1</dc:creator>
      <dc:date>2016-08-24T18:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293817#M61230</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/kb/41/380.html" target="_blank"&gt;http://support.sas.com/kb/41/380.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* create monthly sales data from January 2008 to December 2010 */
data test;
do mo_period = '01jan2008'd to '31dec2010'd;
  sales = round(ranuni(1234567) * 1000, .01);
  mo_period = intnx('month', mo_period, 0, 'END');
  output;
end;
format mo_period monyy7. sales comma10.2;
run;

/*specify the number of periods in the rolling sum and average*/
%let roll_num = 12;

data new;
set test;
/*create array with specific number of elements*/
/*passing _temporary_ arrays as arguments to functions is not supported*/
/*until SAS 9.2*/
/*if the array is a _TEMPORARY_ array, the elements are automatically retained*/
array summed[&amp;amp;roll_num] _temporary_;

/*alternatively, a non-temporary array can be used but must be retained:*/
/*array summed[&amp;amp;roll_num];*/
/*retain summed;*/

/*E represents the element of the array to assign a sales value*/
/*Increment it by one unless it is equal to &amp;amp;roll_num, at which point*/
/*start over and assign it a value of 1. This causes the oldest period to*/
/*be replaced by the newest period once &amp;amp;roll_num periods have been read.*/
if E = &amp;amp;roll_num then E = 1;
else E + 1;
/*assign value to proper element of the array*/
summed[E] = sales;
/*start summing once &amp;amp;roll_num values have been read from the data set*/
if _N_ &amp;gt;= &amp;amp;roll_num then do;
  roll_sum = sum(of summed[*]);
  roll_avg = mean(of summed[*]);
end;
format roll_sum roll_avg comma10.2;
run;

proc print; run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Aug 2016 19:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293817#M61230</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-24T19:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293823#M61231</link>
      <description>&lt;P&gt;Here's a fully worked example, including both using temporary arrays AND proc expand for a second check.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.stocks out=stocks;
by stock date;
run;

data stocks_avg12;
set stocks;
by stock;

array values(12) _temporary_;

if first.stock then do;
call missing(of values(*));
count=0;
end;

count+1;

values(mod(count, 12)+1) = open;

if count&amp;gt;=12 then average=mean(of values(*));

format average dollar12.2;

run;

proc expand data=stocks_avg12 out=stocks_avg12_method2;
by stock;
id  date;
convert open=average2 / transformout=(movave 12 trimleft 11);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Aug 2016 19:36:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293823#M61231</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-08-24T19:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293944#M61294</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/55044"&gt;@Jack1&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Thanks. &amp;nbsp;Makes sense. &amp;nbsp;In your statement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Instead of using _n_, create your own counter (reatain!) that is reset whenever the industry code changes (first.code); you might also clear your array at that point.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;How would I modify my code above to get the desired outcome? &amp;nbsp;I am fairly new to SAS coding. &amp;nbsp;Thanks again....&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This would look like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let roll_num = 12;
data new;
set newview;
by code;
retain counter;
array summed[&amp;amp;roll_num] _temporary_;
if first.code
then do;
  counter = 1;
  do e = 1 to &amp;amp;roll_num;
    summed[e] = 0;
  end;
end;
else counter + 1;
if E &amp;gt;= &amp;amp;roll_num
then E = 1;
else E + 1;
summed[E] = Bankruptcy_CA;
if counter &amp;gt;= &amp;amp;roll_num
then do;
  CA_CT = sum(of summed[*]); * CT means cumulative total;
end;
format CA_CT comma8.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that I slightly changed the condition where e is reset to 1, as to accommodate the result of using e as loop counter.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 06:22:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/293944#M61294</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-08-25T06:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/294123#M61335</link>
      <description>&lt;P&gt;Works great Kurt! &amp;nbsp;Thanks.....Jack&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 18:05:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/294123#M61335</guid>
      <dc:creator>Jack1</dc:creator>
      <dc:date>2016-08-25T18:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/369845#M88348</link>
      <description>&lt;P&gt;Dear sirs,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data set from where i need to generate rolling 12 months sum on all the numeric variables. I'm not able to provide the sample data for you but the variable names are below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Variable Name&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;repyr&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;repqtr&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;repmthdt&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;DSN&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;hbr_pi&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;hbr_ser&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;htm_pi&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;htm_ser&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;flg_NilSettledPay&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;flg_Windscreen&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;ap_ind&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;type&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;inc_amtt_bnd&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;prefix2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;product_desc&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Source_System&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;cnt_Outstand_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;pay_amtm_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;pay_amtt_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;rt_est_amt_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;inc_outstand_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;rec_settle_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;inc_settle_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;life_cyc_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;cnt_notified_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;cnt_Settle_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;cnt_Reopen_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;rec_amtm_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;inc_amtt_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;notificationtime_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;nillsettled_Sum&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Type&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Date&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Date&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Date&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Character&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#000000" face="Calibri" size="3"&gt;Numeric&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and my program code is below using proc sql.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;sql&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; nowarn;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;create&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;table&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; summary_12MTD &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;select&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;distinct&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.repyr label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Reporting Year"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.repqtr label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Reporting Quarter"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.repmthdt label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Reporting Month"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.DSN label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Dataset Name"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.hbr_pi label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"PI Handling Branch"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.hbr_ser label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Service Handling Branch"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.htm_pi label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"PI Handling Team"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.htm_ser label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Service Handling Team"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.flg_NilSettledPay label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Nill Settled Flag"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.flg_Windscreen label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Windscreen Flag"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.ap_ind label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"PI Indicator"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.type label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Claim Type"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.inc_amtt_bnd label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Incurred Amount Band"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.prefix2 label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Policy Prefix"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.product_desc label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Product Group"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.Source_System,t1.cnt_Outstand_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Monthly Outstanding Count"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.pay_amtm_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Monthly Paid Movement"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.pay_amtt_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Monthly Total Paid"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.rt_est_amt_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Estimate Amount"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.inc_outstand_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Outstanding Incurred Amount"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.rec_settle_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Settled Recovered Amount(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.inc_settle_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Settled Incurred Amount(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.life_cyc_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Life cycle(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.cnt_notified_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Notified Count(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.cnt_Settle_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Settled Count(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.cnt_Reopen_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Reopen Count(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.rec_amtm_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Recovered Movement(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.inc_amtt_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Total Incurred Amount(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.notificationtime_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Notification days(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;t1.nillsettled_sum label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"Nill Settled Count(Monthly)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.life_cyc_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; life_cyc_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Lifecycle"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.pay_amtt_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; pay_amtt_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Total Paid"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.rec_settle_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; rec_settle_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Settled Recovered Amount"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.inc_settle_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; inc_settle_121MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Settled Incurred Amount"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.cnt_notified_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; cnt_notified_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Notified Count"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.cnt_Settle_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; cnt_Settle_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Settled Count"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.cnt_Reopen_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; cnt_Reopen_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Reopened Count"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.inc_amtt_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; inc_amtt_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Incurred Total"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.notificationtime_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; notificationtime_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Notification Time"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;sum(t2.nillsettled_sum) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;as&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; nillsettled_12MTD label=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"12MTD Nill Settled Count"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;from&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; work.summary t1 &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;left&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;join&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; work.summary t2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;on&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.DSN =t2.DSN&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.hbr_pi =t2.hbr_pi&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.hbr_ser =t2.hbr_ser&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.htm_pi =t2.htm_pi&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.htm_ser =t2.htm_ser&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.flg_NilSettledPay =t2.flg_NilSettledPay&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.flg_Windscreen =t2.flg_Windscreen&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.ap_ind =t2.ap_ind&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.type =t2.type&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.inc_amtt_bnd =t2.inc_amtt_bnd&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.prefix2 =t2.prefix2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.product_desc =t2.product_desc&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.Source_System =t2.Source_System&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; intck(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"month"&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;,t1.repmthdt,t2.repmthdt) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;between&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;0&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;and&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; -&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;11&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;group&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;by&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; t1.repyr,t1.repqtr,t1.repmthdt,t1.DSN,t1.hbr_pi,t1.hbr_ser,t1.htm_pi,t1.htm_ser,t1.flg_NilSettledPay,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;t1.flg_Windscreen,t1.ap_ind,t1.type,t1.inc_amtt_bnd,t1.prefix2,t1.product_desc,t1.Source_System,&lt;/P&gt;&lt;P&gt;t1.nillsettled_Sum,t1.notificationtime_Sum,t1.inc_amtt_Sum,t1.rec_amtm_Sum,t1.cnt_Reopen_Sum,&lt;/P&gt;&lt;P&gt;t1.cnt_Settle_Sum,t1.cnt_notified_Sum,t1.life_cyc_Sum,t1.inc_settle_Sum,t1.rec_settle_Sum,&lt;/P&gt;&lt;P&gt;t1.inc_outstand_Sum,t1.rt_est_amt_Sum,t1.pay_amtt_Sum,t1.pay_amtm_Sum,t1.cnt_Outstand_Sum&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;I'm not able to get the correct 12MTD values...&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;ANY HELP IS MUCH APPRECIATED.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 12:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/369845#M88348</guid>
      <dc:creator>Reddi</dc:creator>
      <dc:date>2017-06-23T12:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Generating rolling 12 month totals for multiple industry codes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/369855#M88349</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/131207"&gt;@Reddi&lt;/a&gt;&amp;nbsp;Please post your question as it's own new question and note that rolling statistics are more easily calculated in a data step. Especially if you want to do all numeric variables.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 13:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Generating-rolling-12-month-totals-for-multiple-industry-codes/m-p/369855#M88349</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-06-23T13:08:02Z</dc:date>
    </item>
  </channel>
</rss>

