<?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: Selecting only rows with max value? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Selecting-only-rows-with-max-value/m-p/41771#M24362</link>
    <description>&lt;P&gt;Thank you, this worked perfectly, very much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jul 2017 14:20:31 GMT</pubDate>
    <dc:creator>ChrisNally</dc:creator>
    <dc:date>2017-07-11T14:20:31Z</dc:date>
    <item>
      <title>Selecting only rows with max value?</title>
      <link>https://community.jmp.com/t5/Discussions/Selecting-only-rows-with-max-value/m-p/41765#M24357</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rookie to scripting and looking for some scripting help:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have a table of final specifications with all incarnations listed from version 1 to version 23 (in a column headed 'VERSION'. Table is nearly 1000 rows and will be updated&amp;nbsp;as spec changes.&lt;/P&gt;&lt;P&gt;I am attempting to select only the rows with the latest version ( at the moment version 23 but will change over time) and delete all other rows from the table. I&amp;nbsp;would therefore be looking to select the max value for this column rather than a specific number to make it futureproof. I have spent a few hours today trying to work it out but no success. Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 13:22:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Selecting-only-rows-with-max-value/m-p/41765#M24357</guid>
      <dc:creator>ChrisNally</dc:creator>
      <dc:date>2017-07-11T13:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting only rows with max value?</title>
      <link>https://community.jmp.com/t5/Discussions/Selecting-only-rows-with-max-value/m-p/41767#M24359</link>
      <description>&lt;P&gt;This will do it. &amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "Untitled 2",
	Add Rows( 6 ),
	New Column( "VERSION", Numeric, "Continuous",
		Format( "Best", 12 ), Set Values( [1, 2, 3, 1, 2, 3] )
	),
	New Column( "Data", Character, "Nominal",
		Set Values( {"a", "b", "c", "d", "e", "f"} )
	)
);

max_version = colmax(column(dt, "VERSION"));

dt &amp;lt;&amp;lt; select where(as column(dt, "VERSION") == max_version) &amp;lt;&amp;lt; invert row selection &amp;lt;&amp;lt; delete rows;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Jul 2017 13:39:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Selecting-only-rows-with-max-value/m-p/41767#M24359</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2017-07-11T13:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting only rows with max value?</title>
      <link>https://community.jmp.com/t5/Discussions/Selecting-only-rows-with-max-value/m-p/41771#M24362</link>
      <description>&lt;P&gt;Thank you, this worked perfectly, very much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 14:20:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Selecting-only-rows-with-max-value/m-p/41771#M24362</guid>
      <dc:creator>ChrisNally</dc:creator>
      <dc:date>2017-07-11T14:20:31Z</dc:date>
    </item>
  </channel>
</rss>

