<?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: How to select  3 months  with different transactin amount in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452392#M29188</link>
    <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.As mentioned if transaction data :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF First month 60 and second month 60 and third month 60&lt;/STRONG&gt;.... then it should be not select.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only the transaction&lt;STRONG&gt; if&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;First month 60 and second month 50 and third month 40&lt;/STRONG&gt;... will be select from dataset. Means&amp;nbsp;transaction data should be distinct .. they only data should be select in the query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example :&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Bill&lt;/TD&gt;&lt;TD&gt;Txn_Date&lt;/TD&gt;&lt;TD&gt;newcin&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;04/01/2018&lt;/TD&gt;&lt;TD&gt;EMP1001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;04/02/2018&lt;/TD&gt;&lt;TD&gt;EMP1001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;04/03/2018&lt;/TD&gt;&lt;TD&gt;EMP1001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;04/01/2018&lt;/TD&gt;&lt;TD&gt;EMP1002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;04/02/2018&lt;/TD&gt;&lt;TD&gt;EMP1002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;04/03/2018&lt;/TD&gt;&lt;TD&gt;EMP1002&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;In the above example only &lt;STRONG&gt;EMP1002&lt;/STRONG&gt;&amp;nbsp; should be select,because&amp;nbsp; it is having distinct bill amount 30,40,50.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The other&amp;nbsp;&lt;STRONG&gt;EMP1002&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; should not select, because it is having the same bill amount 60,60,60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here my requirement is need to select only EMP1002 records only.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dhruva,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Apr 2018 03:25:19 GMT</pubDate>
    <dc:creator>dhruvakumar</dc:creator>
    <dc:date>2018-04-09T03:25:19Z</dc:date>
    <item>
      <title>How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451755#M29165</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I stuck in one issue, I have dataset which is having 3 months, but I need to select customer data who have different&amp;nbsp; transaction data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;IF First month 60 and second month 60 and third month 60.....&amp;gt; Then to be delete&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF First month 60 and second month 50 and third month 60.....&amp;gt; Then to be delete&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF First month 60 and second month 50 and third month 40.....&amp;gt; Then to be&amp;nbsp;Include.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help on this issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 03:13:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451755#M29165</guid>
      <dc:creator>dhruvakumar</dc:creator>
      <dc:date>2018-04-06T03:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451777#M29166</link>
      <description>&lt;P&gt;Hi Dhruv,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;use intck function to calculated no of days or no of month between tow&amp;nbsp;&amp;nbsp;transaction date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;no_of_day = intck("days",'01jan18'd,'01apr18'd) ---&amp;gt; will show the no of days&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;no_of_day = intck("MONTH",'01jan18'd,'01apr18'd)&amp;nbsp; ----&amp;gt; will show the no of month&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 06:42:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451777#M29166</guid>
      <dc:creator>TarunKumar</dc:creator>
      <dc:date>2018-04-06T06:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transaction...</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451784#M29167</link>
      <description>&lt;P&gt;Hi Tarun,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for reply. Here my requirement is not to delete months. In the above example 60 is not number of days, it transaction amount.&lt;/P&gt;&lt;P&gt;In the first instance all 3 months have 60 so ,it will not be select, same as second which 60 is repeated in twice.. so it would be not select.&lt;/P&gt;&lt;P&gt;Last instance.. it have three different transaction amount so it would be include.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 07:16:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451784#M29167</guid>
      <dc:creator>dhruvakumar</dc:creator>
      <dc:date>2018-04-06T07:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transaction...</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451792#M29168</link>
      <description>&lt;P&gt;WANT UNIQUE TRANSACTION MONTH ?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 08:05:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451792#M29168</guid>
      <dc:creator>TarunKumar</dc:creator>
      <dc:date>2018-04-06T08:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451793#M29169</link>
      <description>&lt;P&gt;It is always a VERY GOOD IDEA to supply example data that illustrates the issue and which can be used for testing. The proper method for this is posting a data step with datalines. A macro that does the conversion of a dataset to a data step can be found &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;here&lt;/A&gt;, and the proper method for posting code so that the formatting is preserved can be found &lt;A href="https://communities.sas.com/t5/help/faqpage/faq-category-id/posting#posting" target="_blank"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 08:10:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451793#M29169</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-06T08:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451945#M29175</link>
      <description>&lt;P&gt;Provide example input data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Provide example desired result. Data is best provided in the form of data steps so we know variable names and types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post question requirements in terms of those named variables in your data set.&lt;/P&gt;
&lt;P&gt;You may know what&lt;/P&gt;
&lt;PRE&gt;IF First month 60 and second month 60 and third month 60.....&amp;gt; &lt;/PRE&gt;
&lt;P&gt;means but without data, variables and explanations of how you determine a value is first month and what ever the heck 60 is we can't help much. And are you interested in exactly 60, greater than 60, less than 60, greater than or equal to 60 or less than or equal to 60???&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 15:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/451945#M29175</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-06T15:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452392#M29188</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.As mentioned if transaction data :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF First month 60 and second month 60 and third month 60&lt;/STRONG&gt;.... then it should be not select.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only the transaction&lt;STRONG&gt; if&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;First month 60 and second month 50 and third month 40&lt;/STRONG&gt;... will be select from dataset. Means&amp;nbsp;transaction data should be distinct .. they only data should be select in the query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example :&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Bill&lt;/TD&gt;&lt;TD&gt;Txn_Date&lt;/TD&gt;&lt;TD&gt;newcin&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;04/01/2018&lt;/TD&gt;&lt;TD&gt;EMP1001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;04/02/2018&lt;/TD&gt;&lt;TD&gt;EMP1001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;04/03/2018&lt;/TD&gt;&lt;TD&gt;EMP1001&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;04/01/2018&lt;/TD&gt;&lt;TD&gt;EMP1002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;04/02/2018&lt;/TD&gt;&lt;TD&gt;EMP1002&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;04/03/2018&lt;/TD&gt;&lt;TD&gt;EMP1002&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;In the above example only &lt;STRONG&gt;EMP1002&lt;/STRONG&gt;&amp;nbsp; should be select,because&amp;nbsp; it is having distinct bill amount 30,40,50.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The other&amp;nbsp;&lt;STRONG&gt;EMP1002&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp; should not select, because it is having the same bill amount 60,60,60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Here my requirement is need to select only EMP1002 records only.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Dhruva,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 03:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452392#M29188</guid>
      <dc:creator>dhruvakumar</dc:creator>
      <dc:date>2018-04-09T03:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452421#M29190</link>
      <description>&lt;P&gt;Here is a quick example of what we mean by "post datasets in a data step":&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input bill txn_date :mmddyy10. newcin $;
cards;
60 04/01/2018 EMP1001
60 04/02/2018 EMP1001
60 04/03/2018 EMP1001
40 04/01/2018 EMP1002
50 04/02/2018 EMP1002
30 04/03/2018 EMP1002
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please follow this example in the future, as it makes creating and testing code that much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A solution SQL looks like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select * from have
where newcin in (
  select newcin
  from have
  group by newcin
  having count(distinct bill) &amp;gt; 1
)
;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Apr 2018 07:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452421#M29190</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-04-09T07:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452423#M29191</link>
      <description>&lt;P&gt;Dear KurtBremser,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Excellent.Thank you very much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhruva.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 07:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452423#M29191</guid>
      <dc:creator>dhruvakumar</dc:creator>
      <dc:date>2018-04-09T07:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452447#M29194</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/203162"&gt;@dhruvakumar&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;If &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;answer is the solution for you then please mark it as solution. This is your way to say "thank you" and it also shows your question as answered on the overview page.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 08:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452447#M29194</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-04-09T08:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to select  3 months  with different transactin amount</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452455#M29195</link>
      <description>Hi Patrick,&lt;BR /&gt;&lt;BR /&gt;Thank you for advise.Done.</description>
      <pubDate>Mon, 09 Apr 2018 10:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/How-to-select-3-months-with-different-transactin-amount/m-p/452455#M29195</guid>
      <dc:creator>dhruvakumar</dc:creator>
      <dc:date>2018-04-09T10:05:50Z</dc:date>
    </item>
  </channel>
</rss>

