<?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: Find top &amp;amp; bottom 10% of records by group in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Find-top-amp-bottom-10-of-records-by-group/m-p/534443#M146654</link>
    <description>&lt;P&gt;Take a look at documentation on&amp;nbsp;&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0le3p5ngj1zlbn1mh3tistq9t76.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;PROC RANK&lt;/A&gt;.&amp;nbsp; You'll probably want to set the GROUPS=10 option.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Feb 2019 13:14:25 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2019-02-11T13:14:25Z</dc:date>
    <item>
      <title>Find top &amp; bottom 10% of records by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-top-amp-bottom-10-of-records-by-group/m-p/534380#M146652</link>
      <description>&lt;P&gt;hi need quick help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if i need to get the top% &amp;amp; bottom 10% by each group.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can you please give me some solution with example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Inadvance&lt;/P&gt;
&lt;P&gt;Mahendra&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 12:59:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-top-amp-bottom-10-of-records-by-group/m-p/534380#M146652</guid>
      <dc:creator>mahibhu</dc:creator>
      <dc:date>2019-02-11T12:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Find top &amp; bottom 10% of records by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-top-amp-bottom-10-of-records-by-group/m-p/534439#M146653</link>
      <description>&lt;P&gt;Here's one way, using PROC RANK -- tailor made for problems like this.&amp;nbsp; The RANK procedure can assign ranks by decile (groups=10), so rank=0 is the lowest 10%, and rank=9 is the highest 10%.&amp;nbsp; Here's an example with the CARS data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort
	data=sashelp.cars
	out=work.sortedcars
	;
	by origin;
run;

proc rank data = work.sortedcars
	groups=10
	ties=mean
	out=top_bottom;
	by origin;
	var msrp;
ranks ranked_msrp ;
run;

title "top 10% in each group";
proc print data=top_bottom;
 var origin make model msrp;
 where ranked_msrp = 9;
 by origin;
run;

title "bottom 10% in each group";
proc print data=top_bottom;
 var origin make model msrp;
 where ranked_msrp = 0;
 by origin;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Feb 2019 13:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-top-amp-bottom-10-of-records-by-group/m-p/534439#M146653</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2019-02-11T13:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Find top &amp; bottom 10% of records by group</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Find-top-amp-bottom-10-of-records-by-group/m-p/534443#M146654</link>
      <description>&lt;P&gt;Take a look at documentation on&amp;nbsp;&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p0le3p5ngj1zlbn1mh3tistq9t76.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;PROC RANK&lt;/A&gt;.&amp;nbsp; You'll probably want to set the GROUPS=10 option.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 13:14:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Find-top-amp-bottom-10-of-records-by-group/m-p/534443#M146654</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2019-02-11T13:14:25Z</dc:date>
    </item>
  </channel>
</rss>

