<?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: conditional retain debends on amt values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/conditional-retain-depends-on-amt-values/m-p/574165#M162183</link>
    <description>&lt;P&gt;I can't find the two questions but just 3 requirements. What have you tried already?&lt;/P&gt;
&lt;P&gt;May be post the code you've got already (even if not working), a data step reading the data and then show us the desired result.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2019 13:24:46 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2019-07-17T13:24:46Z</dc:date>
    <item>
      <title>conditional retain depends on amt values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/conditional-retain-depends-on-amt-values/m-p/574142#M162170</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my&amp;nbsp;test table. I would have&amp;nbsp;3 questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;amt&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;12&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;50&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;52&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;10&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;11&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;13&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;60&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;65&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;120&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;If, after the first two occurrences, the difference is greater than 20% compared to the third one, then do one flg &lt;SPAN&gt;how can i do it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2. Same&amp;nbsp;table but I'd like to &lt;SPAN&gt;mark only if the amount fields do not change and always the same how can i do it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. S&lt;/SPAN&gt;&lt;SPAN&gt;ame&amp;nbsp;table but I'd like to mark only if the amount fields always changeing. How can i do it?.(each is different) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;amt&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;10&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;12&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;50&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;52&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;10&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;11&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;13&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;60&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;65&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;120&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. eg:&lt;/P&gt;&lt;P&gt;new final table looks like:&lt;/P&gt;&lt;P&gt;Id flg&lt;/P&gt;&lt;P&gt;1 y&lt;/P&gt;&lt;P&gt;2 n&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 13:28:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/conditional-retain-depends-on-amt-values/m-p/574142#M162170</guid>
      <dc:creator>ger15xxhcker</dc:creator>
      <dc:date>2019-07-17T13:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: conditional retain debends on amt values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/conditional-retain-depends-on-amt-values/m-p/574165#M162183</link>
      <description>&lt;P&gt;I can't find the two questions but just 3 requirements. What have you tried already?&lt;/P&gt;
&lt;P&gt;May be post the code you've got already (even if not working), a data step reading the data and then show us the desired result.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 13:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/conditional-retain-depends-on-amt-values/m-p/574165#M162183</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-07-17T13:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: conditional retain debends on amt values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/conditional-retain-depends-on-amt-values/m-p/574226#M162215</link>
      <description>&lt;P&gt;Thank you for your guidance! Unfortunately I don't know how to start with it &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
 input id amt;
 datalines;
 1 5
 1 5
 1 106
 2 90
 2 100
 3 111
 3 111
 3 111
 3 111
 4 837
 4 838
 4 839
 ;
run;

data want01; /*01 after the first two occurrences, the difference is greater than 20% compared to the third one*/
 input id flg$;
 datalines;
 1 Y
 ;
run;
data want02; /*02 where the amt field is constant*/
 input id flg$;
 datalines;
 3 Y
 ;
run;
data want03; /*03 where the amt field always changeing*/
 input id flg$;
 datalines;
 2 Y
 4 Y
 ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks for your reply!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 15:35:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/conditional-retain-depends-on-amt-values/m-p/574226#M162215</guid>
      <dc:creator>ger15xxhcker</dc:creator>
      <dc:date>2019-07-17T15:35:54Z</dc:date>
    </item>
  </channel>
</rss>

