<?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 Find out the countries which have highest and lowest Amount in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393444#M94744</link>
    <description>&lt;P&gt;the below is the data set. and i need to compute the&amp;nbsp;&amp;nbsp;countries which have highest and lowest Amount&lt;/P&gt;&lt;P&gt;so anyone can help me&lt;/P&gt;&lt;P&gt;and another question is&amp;nbsp;to create a report to have Country wise Category based sum of Amount&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2017 07:15:06 GMT</pubDate>
    <dc:creator>Karan_Dumbre</dc:creator>
    <dc:date>2017-09-06T07:15:06Z</dc:date>
    <item>
      <title>Find out the countries which have highest and lowest Amount</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393444#M94744</link>
      <description>&lt;P&gt;the below is the data set. and i need to compute the&amp;nbsp;&amp;nbsp;countries which have highest and lowest Amount&lt;/P&gt;&lt;P&gt;so anyone can help me&lt;/P&gt;&lt;P&gt;and another question is&amp;nbsp;to create a report to have Country wise Category based sum of Amount&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 07:15:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393444#M94744</guid>
      <dc:creator>Karan_Dumbre</dc:creator>
      <dc:date>2017-09-06T07:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Find out the countries which have highest and lowest Amount</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393448#M94745</link>
      <description>&lt;P&gt;Without having opened your data, do something like this and adjust the class variables to your liking.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=product sum;
	class Country;
	var Amount;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Sep 2017 07:55:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393448#M94745</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-09-06T07:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Find out the countries which have highest and lowest Amount</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393449#M94746</link>
      <description>&lt;P&gt;i want which country has the highest amount n lowest amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;i tried sorting the data set and display the first obs which is the lowest n last obs&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 08:07:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393449#M94746</guid>
      <dc:creator>Karan_Dumbre</dc:creator>
      <dc:date>2017-09-06T08:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Find out the countries which have highest and lowest Amount</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393451#M94748</link>
      <description>&lt;P&gt;First do a proc Means to get your totals into an output data set&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=product sum;
	class country;
	var amount;
	output out=summary(where=(_type_=1)) sum=total;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then to get the maximum and minimum&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
	select country, total
	from summary
	having total=max(total) or total=min(total);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A simple report can be generated with Proc Print&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=summary;
	var country total;
	title "Country Totals";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Of course much more elaborate reports can be produced with SAS but as you give no further details I've just shown the simplest method &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 08:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-out-the-countries-which-have-highest-and-lowest-Amount/m-p/393451#M94748</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-09-06T08:19:03Z</dc:date>
    </item>
  </channel>
</rss>

