<?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 subset top 10 highest values by year and location? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/599702#M80313</link>
    <description>&lt;P&gt;Here is an example of a simple way to create a table with just the top 10 for each group(site)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1676056755935.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49997iB494245649802A90/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1676056755935.png" alt="txnelson_0-1676056755935.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt=// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; sort(by(:sex, :height), order(descending,descending), replace table(1));

dt&amp;lt;&amp;lt; select where(col cumulative sum(1, :sex) &amp;lt;=10);

dtFinal = dt &amp;lt;&amp;lt; subset(output table("Top 10"), selected rows(1), selected columns(0));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 10 Feb 2023 19:19:40 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-02-10T19:19:40Z</dc:date>
    <item>
      <title>How to subset top 10 highest values by year and location?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/599692#M80312</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have a dataset of daily ozone concentrations from multiple sites over several years. Is there a quick way to subset the top ten highest concentrations at each site and year?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:37:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/599692#M80312</guid>
      <dc:creator>shasheminassab</dc:creator>
      <dc:date>2023-06-08T16:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset top 10 highest values by year and location?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/599702#M80313</link>
      <description>&lt;P&gt;Here is an example of a simple way to create a table with just the top 10 for each group(site)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1676056755935.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49997iB494245649802A90/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1676056755935.png" alt="txnelson_0-1676056755935.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt=// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; sort(by(:sex, :height), order(descending,descending), replace table(1));

dt&amp;lt;&amp;lt; select where(col cumulative sum(1, :sex) &amp;lt;=10);

dtFinal = dt &amp;lt;&amp;lt; subset(output table("Top 10"), selected rows(1), selected columns(0));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Feb 2023 19:19:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/599702#M80313</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-02-10T19:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset top 10 highest values by year and location?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/599707#M80314</link>
      <description>&lt;P&gt;You can create formula to get top10, use summary or tabulate. And then depending on how your data looks like you might need additional calculation to easily get the top10&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 19:26:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/599707#M80314</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-02-10T19:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset top 10 highest values by year and location?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/934782#M109059</link>
      <description>&lt;P&gt;Hi, I am very happy to learn about "select where(col cumulative sum(1, :sex) &amp;lt;=10)".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am wondering if I can push it further, say if I want to select top 5 for male, and top 7 for female? Many thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2026 10:30:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/934782#M109059</guid>
      <dc:creator>derchieh</dc:creator>
      <dc:date>2026-03-11T10:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to subset top 10 highest values by year and location?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/934799#M109060</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; select where( Col Cumulative Sum( 1, :sex ) &amp;lt;= Match( :sex, "M", 5, 7 ) );
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Mar 2026 12:32:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-subset-top-10-highest-values-by-year-and-location/m-p/934799#M109060</guid>
      <dc:creator>mmarchandFSLR</dc:creator>
      <dc:date>2026-03-11T12:32:13Z</dc:date>
    </item>
  </channel>
</rss>

