<?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 Output a dataset with the top obs per group in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Output-a-dataset-with-the-top-obs-per-group/m-p/913744#M44233</link>
    <description>&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've run a proc summary which has produced a count of values by different groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do now is take this dataset and output the highest number obs for each group. The issue I'm having is trying to output the top obs per group when there are more than one highest in a group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance there could be only 1 for one group but 3 for another. Any ideas how best to overcome this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2024 10:40:25 GMT</pubDate>
    <dc:creator>Sean_OConnor</dc:creator>
    <dc:date>2024-01-31T10:40:25Z</dc:date>
    <item>
      <title>Output a dataset with the top obs per group</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Output-a-dataset-with-the-top-obs-per-group/m-p/913744#M44233</link>
      <description>&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've run a proc summary which has produced a count of values by different groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like to do now is take this dataset and output the highest number obs for each group. The issue I'm having is trying to output the top obs per group when there are more than one highest in a group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance there could be only 1 for one group but 3 for another. Any ideas how best to overcome this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 10:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Output-a-dataset-with-the-top-obs-per-group/m-p/913744#M44233</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2024-01-31T10:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Output a dataset with the top obs per group</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Output-a-dataset-with-the-top-obs-per-group/m-p/913746#M44234</link>
      <description>&lt;P&gt;4 ways to find the k smallest and largest data values in SAS &lt;BR /&gt;By Rick Wicklin on The DO Loop January 26, 2022&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2022/01/26/k-smallest-largest-data.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2022/01/26/k-smallest-largest-data.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In CASL code ... you can use the&amp;nbsp;&lt;SPAN&gt;action simple.topK,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;which selects the top K and bottom K values for variables in a data set, based on a user-specified ranking order.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Just don't forget to perform all your analyses by-group based !&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 10:45:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Output-a-dataset-with-the-top-obs-per-group/m-p/913746#M44234</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2024-01-31T10:45:59Z</dc:date>
    </item>
  </channel>
</rss>

