<?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: Need help with data set. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/570456#M34096</link>
    <description>&lt;P&gt;This check&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if payed + payment_sum &amp;gt;= max_sum&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;was wrong, you should test for greater instead of greater or equal.&lt;/P&gt;
&lt;P&gt;See this refined code (note the ways the original dataset is presented in a data step with datalines; please do so in the future, as it helps greatly in devising solutions):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input
  id_client :$8.
  id_payment :$10.
  max_sum
  from_dt :yymmdd10.
  to_dt :yymmdd10.
  Payment_sum
;
format from_dt to_dt yymmddd10.;
datalines;
37212568 5061016939 60000 2019-06-14 2019-06-17 59079.99
37212568 5059309186 60000 2019-06-14 2019-06-17 7535
37212568 5096581965 80000 2019-06-18 2019-12-01 16773.95
37212568 5095504587 80000 2019-06-18 2019-12-01 20000
37212568 5094637028 80000 2019-06-18 2019-12-01 3523
37212568 5087834012 80000 2019-06-18 2019-12-01 13111.16
37212568 5096774461 80000 2019-06-18 2019-12-01 2168
37212568 5087460886 80000 2019-06-18 2019-12-01 61960
37212568 5088215409 80000 2019-06-18 2019-12-01 21077
37212568 5094892350 80000 2019-06-18 2019-12-01 299.84
37212568 5089225101 80000 2019-06-18 2019-12-01 1005.8
;

data want;
set have;
by id_client;
retain payed to_pay;
if first.id_client
then do;
  payed = 0;
  to_pay = 0;
end;
else do;
  if payed + payment_sum &amp;gt; max_sum
  then payed = max_sum;
  else payed = payed + to_pay;
end;
if max_sum &amp;gt; payment_sum + payed
then to_pay = payment_sum;
else do;
  if max_sum - payed &amp;gt;= 0
  then to_pay = max_sum - payed;
  else to_pay = 0;
end;
run;

proc print data=want noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                                                                  Payment_
id_client    id_payment    max_sum       from_dt         to_dt       sum         payed      to_pay

37212568     5061016939     60000     2019-06-14    2019-06-17    59079.99        0.00    59079.99
37212568     5059309186     60000     2019-06-14    2019-06-17     7535.00    59079.99      920.01
37212568     5096581965     80000     2019-06-18    2019-12-01    16773.95    60000.00    16773.95
37212568     5095504587     80000     2019-06-18    2019-12-01    20000.00    76773.95     3226.05
37212568     5094637028     80000     2019-06-18    2019-12-01     3523.00    80000.00        0.00
37212568     5087834012     80000     2019-06-18    2019-12-01    13111.16    80000.00        0.00
37212568     5096774461     80000     2019-06-18    2019-12-01     2168.00    80000.00        0.00
37212568     5087460886     80000     2019-06-18    2019-12-01    61960.00    80000.00        0.00
37212568     5088215409     80000     2019-06-18    2019-12-01    21077.00    80000.00        0.00
37212568     5094892350     80000     2019-06-18    2019-12-01      299.84    80000.00        0.00
37212568     5089225101     80000     2019-06-18    2019-12-01     1005.80    80000.00        0.00
&lt;/PRE&gt;
&lt;P&gt;Note how use of the by statement and the first. variable simplifies detecting a group change. Also see how I simplified the condition tests.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2019 08:42:41 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-07-02T08:42:41Z</dc:date>
    <item>
      <title>Need help with data set.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567879#M34044</link>
      <description>&lt;P&gt;Hi.&amp;nbsp;&lt;BR /&gt;I have the table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;id_client&amp;nbsp; &amp;nbsp; |&amp;nbsp; id_payment | max_sum | from_dt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | to_dt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| Payment_sum&lt;/P&gt;&lt;P&gt;37212568 | 5061016939 | 60000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-14 | 2019-06-17 | 59079.99&lt;BR /&gt;37212568 | 5059309186 | 60000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-14 | 2019-06-17 | 7535&lt;BR /&gt;37212568 | 5096581965 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 16773.95&lt;BR /&gt;37212568 | 5095504587 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 20000&lt;BR /&gt;37212568 | 5094637028 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 3523&lt;BR /&gt;37212568 | 5087834012 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 13111.16&lt;BR /&gt;37212568 | 5096774461 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 2168&lt;BR /&gt;37212568 | 5087460886 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 61960&lt;BR /&gt;37212568 | 5088215409 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 21077&lt;BR /&gt;37212568 | 5094892350 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 299.84&lt;BR /&gt;37212568 | 5089225101 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2019-06-18 | 2019-12-01 | 1005.8&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And i have the follow code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=table_1; by account_rk from_dt; run;
data table_2;
set table_1;
retain acct 0  payed 0 to_pay 0;
if client_id= acct and payed+payment_sum&amp;gt;= max_sum then payed = max_sum; 
else if client_id= acct and payed+payment_sum&amp;lt; max_sum then payed = payed + to_pay; 
else payed = 0;
acct = client_id;
if max_sum &amp;gt; (payment_sum+ payed) then to_pay = payment_sum;
if max_sum &amp;lt;= (payment_sum+ payed) and max_sum - payed &amp;gt;= 0 then to_pay = max_sum - payed;
if max_sum &amp;lt;= (payment_sum+ payed) and max_sum - payed &amp;lt; 0 then to_pay = 0;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How it works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;id_client&amp;nbsp; &amp;nbsp; |&amp;nbsp; id_payment | max_sum | from_dt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | to_dt&amp;nbsp; &amp;nbsp; &amp;nbsp;| Payment_sum | acct&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp;payed&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | to_pay&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;37212568 | 5061016939 | 60000 | 2019-06-14 | 2019-06-17 | 59079.99&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 37212568 | 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 59079.99&lt;BR /&gt;37212568 | 5059309186 | 60000 | 2019-06-14 | 2019-06-17 | 7535&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 37212568 | 59079.99&amp;nbsp; &amp;nbsp; &amp;nbsp; | 920.01&lt;BR /&gt;37212568 | 5096581965 | 80000 | 2019-06-18 | 2019-12-01 | 16773.95&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 37212568 | 60000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 16773.95&lt;BR /&gt;&lt;STRONG&gt;37212568 | 5095504587 | 80000 | 2019-06-18 | 2019-12-01 | 20000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 37212568 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0&lt;/STRONG&gt;&lt;BR /&gt;37212568 | 5094637028 | 80000 | 2019-06-18 | 2019-12-01 | 3523&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 37212568 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0&lt;BR /&gt;37212568 | 5087834012 | 80000 | 2019-06-18 | 2019-12-01 | 13111.16&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 37212568 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0&lt;BR /&gt;37212568 | 5096774461 | 80000 | 2019-06-18 | 2019-12-01 | 2168&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 37212568 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0&lt;BR /&gt;37212568 | 5087460886 | 80000 | 2019-06-18 | 2019-12-01 | 61960&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 37212568 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0&lt;BR /&gt;37212568 | 5088215409 | 80000 | 2019-06-18 | 2019-12-01 | 21077&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 37212568 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 0&lt;BR /&gt;37212568 | 5094892350 | 80000 | 2019-06-18 | 2019-12-01 | 299.84&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 37212568 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 0&lt;BR /&gt;37212568 | 5089225101 | 80000 | 2019-06-18 | 2019-12-01 | 1005.8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 37212568&amp;nbsp; | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In highlighted row it works incorrecty.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;becacuse it should be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;id_client&amp;nbsp; &amp;nbsp; |&amp;nbsp; id_payment | max_sum | from_dt&amp;nbsp; | to_dt&amp;nbsp; &amp;nbsp; &amp;nbsp; | Payment_sum | acct&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp;payed&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | to_pay&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;37212568 | 5061016939 | 60000 | 2019-06-14 | 2019-06-17 | 59079.99&amp;nbsp; &amp;nbsp; | 37212568 | 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 59079.99&lt;BR /&gt;37212568 | 5059309186 | 60000 | 2019-06-14 | 2019-06-17 | 7535&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 37212568 | 59079.99&amp;nbsp; &amp;nbsp; &amp;nbsp; | 920.01&lt;BR /&gt;37212568 | 5096581965 | 80000 | 2019-06-18 | 2019-12-01 | 16773.95&amp;nbsp; &amp;nbsp; | 37212568 | 60000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 16773.95&lt;BR /&gt;&lt;STRONG&gt;37212568 | 5095504587 | 80000 | 2019-06-18 | 2019-12-01 | 20000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 37212568 | 76773.95&amp;nbsp; &amp;nbsp; &amp;nbsp;| 3226.35&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;37212568 | 5094637028 | 80000 | 2019-06-18 | 2019-12-01 | 3523&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 37212568 | 80000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help, please?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 11:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567879#M34044</guid>
      <dc:creator>mender97</dc:creator>
      <dc:date>2019-06-21T11:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with data set.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567889#M34045</link>
      <description>&lt;P&gt;This condition is satisfied:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if client_id= acct and payed+payment_sum&amp;gt;= max_sum then payed = max_sum;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which leads to this condition being satisfied:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if max_sum &amp;lt;= (payment_sum+ payed) and max_sum - payed &amp;gt;= 0 then to_pay = max_sum - payed;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;which results in zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 12:27:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567889#M34045</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-21T12:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with data set.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567891#M34046</link>
      <description>How I can to fix this?</description>
      <pubDate>Fri, 21 Jun 2019 12:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567891#M34046</guid>
      <dc:creator>mender97</dc:creator>
      <dc:date>2019-06-21T12:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with data set.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567893#M34047</link>
      <description>&lt;P&gt;How would you arrive at payed = 76773.95 when the two source values are 80000 and 20000, respectively?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 12:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567893#M34047</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-06-21T12:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with data set.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567894#M34048</link>
      <description>payed = payed(from previous row) + to_pay(from previous row)&lt;BR /&gt;&lt;BR /&gt;so I need to get payed = 76773.95 = 60000 + 16773.95.</description>
      <pubDate>Fri, 21 Jun 2019 12:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/567894#M34048</guid>
      <dc:creator>mender97</dc:creator>
      <dc:date>2019-06-21T12:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with data set.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/570456#M34096</link>
      <description>&lt;P&gt;This check&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if payed + payment_sum &amp;gt;= max_sum&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;was wrong, you should test for greater instead of greater or equal.&lt;/P&gt;
&lt;P&gt;See this refined code (note the ways the original dataset is presented in a data step with datalines; please do so in the future, as it helps greatly in devising solutions):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input
  id_client :$8.
  id_payment :$10.
  max_sum
  from_dt :yymmdd10.
  to_dt :yymmdd10.
  Payment_sum
;
format from_dt to_dt yymmddd10.;
datalines;
37212568 5061016939 60000 2019-06-14 2019-06-17 59079.99
37212568 5059309186 60000 2019-06-14 2019-06-17 7535
37212568 5096581965 80000 2019-06-18 2019-12-01 16773.95
37212568 5095504587 80000 2019-06-18 2019-12-01 20000
37212568 5094637028 80000 2019-06-18 2019-12-01 3523
37212568 5087834012 80000 2019-06-18 2019-12-01 13111.16
37212568 5096774461 80000 2019-06-18 2019-12-01 2168
37212568 5087460886 80000 2019-06-18 2019-12-01 61960
37212568 5088215409 80000 2019-06-18 2019-12-01 21077
37212568 5094892350 80000 2019-06-18 2019-12-01 299.84
37212568 5089225101 80000 2019-06-18 2019-12-01 1005.8
;

data want;
set have;
by id_client;
retain payed to_pay;
if first.id_client
then do;
  payed = 0;
  to_pay = 0;
end;
else do;
  if payed + payment_sum &amp;gt; max_sum
  then payed = max_sum;
  else payed = payed + to_pay;
end;
if max_sum &amp;gt; payment_sum + payed
then to_pay = payment_sum;
else do;
  if max_sum - payed &amp;gt;= 0
  then to_pay = max_sum - payed;
  else to_pay = 0;
end;
run;

proc print data=want noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                                                                  Payment_
id_client    id_payment    max_sum       from_dt         to_dt       sum         payed      to_pay

37212568     5061016939     60000     2019-06-14    2019-06-17    59079.99        0.00    59079.99
37212568     5059309186     60000     2019-06-14    2019-06-17     7535.00    59079.99      920.01
37212568     5096581965     80000     2019-06-18    2019-12-01    16773.95    60000.00    16773.95
37212568     5095504587     80000     2019-06-18    2019-12-01    20000.00    76773.95     3226.05
37212568     5094637028     80000     2019-06-18    2019-12-01     3523.00    80000.00        0.00
37212568     5087834012     80000     2019-06-18    2019-12-01    13111.16    80000.00        0.00
37212568     5096774461     80000     2019-06-18    2019-12-01     2168.00    80000.00        0.00
37212568     5087460886     80000     2019-06-18    2019-12-01    61960.00    80000.00        0.00
37212568     5088215409     80000     2019-06-18    2019-12-01    21077.00    80000.00        0.00
37212568     5094892350     80000     2019-06-18    2019-12-01      299.84    80000.00        0.00
37212568     5089225101     80000     2019-06-18    2019-12-01     1005.80    80000.00        0.00
&lt;/PRE&gt;
&lt;P&gt;Note how use of the by statement and the first. variable simplifies detecting a group change. Also see how I simplified the condition tests.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 08:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Need-help-with-data-set/m-p/570456#M34096</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-02T08:42:41Z</dc:date>
    </item>
  </channel>
</rss>

