<?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 Filter Top 4 Values from Dataset for Plot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Filter-Top-4-Values-from-Dataset-for-Plot/m-p/657004#M196959</link>
    <description>&lt;P&gt;I am making a number of visualizations using an injury dataset. I have 11 injury sites, but only want to include the Top 4 in my visualizations. The Top 4 will vary depending on sport and scenario (i.e. practice, game, etc.). Is there a way to automate code to filter these out using some sort of sorting or ranking operation? I will primarily be using PROC SGPLOT, but may also use PROC SGRENDER and PROC GCHART to create the visualizations. A sample of one such visualization code is below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=body_pct;
	format pct mypct.;
	styleattrs datacolors=("&amp;amp;Dblue" "&amp;amp;DGray" "&amp;amp;Dblack" "&amp;amp;Dtan");
	vbar injsite / response=pct datalabel datalabelfitpolicy=none datalabelattrs=(size=6) nooutline;
	xaxis label="Injury Site";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Jun 2020 05:04:08 GMT</pubDate>
    <dc:creator>tburus</dc:creator>
    <dc:date>2020-06-11T05:04:08Z</dc:date>
    <item>
      <title>Filter Top 4 Values from Dataset for Plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-Top-4-Values-from-Dataset-for-Plot/m-p/657004#M196959</link>
      <description>&lt;P&gt;I am making a number of visualizations using an injury dataset. I have 11 injury sites, but only want to include the Top 4 in my visualizations. The Top 4 will vary depending on sport and scenario (i.e. practice, game, etc.). Is there a way to automate code to filter these out using some sort of sorting or ranking operation? I will primarily be using PROC SGPLOT, but may also use PROC SGRENDER and PROC GCHART to create the visualizations. A sample of one such visualization code is below:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=body_pct;
	format pct mypct.;
	styleattrs datacolors=("&amp;amp;Dblue" "&amp;amp;DGray" "&amp;amp;Dblack" "&amp;amp;Dtan");
	vbar injsite / response=pct datalabel datalabelfitpolicy=none datalabelattrs=(size=6) nooutline;
	xaxis label="Injury Site";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jun 2020 05:04:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-Top-4-Values-from-Dataset-for-Plot/m-p/657004#M196959</guid>
      <dc:creator>tburus</dc:creator>
      <dc:date>2020-06-11T05:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Top 4 Values from Dataset for Plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-Top-4-Values-from-Dataset-for-Plot/m-p/657040#M196961</link>
      <description>&lt;P&gt;Look at the&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=proc&amp;amp;docsetTarget=p0le3p5ngj1zlbn1mh3tistq9t76.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;RANK Procedure&lt;/A&gt;, and use a where condition on the created ranks.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 05:21:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-Top-4-Values-from-Dataset-for-Plot/m-p/657040#M196961</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-06-11T05:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Top 4 Values from Dataset for Plot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filter-Top-4-Values-from-Dataset-for-Plot/m-p/657086#M196964</link>
      <description>Thanks. That worked perfectly.</description>
      <pubDate>Thu, 11 Jun 2020 05:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filter-Top-4-Values-from-Dataset-for-Plot/m-p/657086#M196964</guid>
      <dc:creator>tburus</dc:creator>
      <dc:date>2020-06-11T05:53:14Z</dc:date>
    </item>
  </channel>
</rss>

