<?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: Return the Row Number of Maximum in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49559#M28184</link>
    <description>&lt;P&gt;Here is a simple solution to your issue.&amp;nbsp; It can be moved directly into a formula, or used in open code as it is shown:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=open("$SAMPLE_DATA\Semiconductor Capability.jmp" );

MaxRow=(dt&amp;lt;&amp;lt;get rows where(Col Maximum(:NPN1)==:NPN1))[1];
show(MaxRow);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 11 Jan 2018 18:12:01 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-01-11T18:12:01Z</dc:date>
    <item>
      <title>Return the Row Number of Maximum</title>
      <link>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49556#M28181</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to get the row number of the maximum value of a column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a formula that uses a value in a column as an offset and I would like to write it in generic form such that it looks in Col1 for a maximum value and then returns the row number such I can use the value of col2 at that row number as the offset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How could I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 17:54:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49556#M28181</guid>
      <dc:creator>Hegedus</dc:creator>
      <dc:date>2018-01-11T17:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Return the Row Number of Maximum</title>
      <link>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49559#M28184</link>
      <description>&lt;P&gt;Here is a simple solution to your issue.&amp;nbsp; It can be moved directly into a formula, or used in open code as it is shown:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=open("$SAMPLE_DATA\Semiconductor Capability.jmp" );

MaxRow=(dt&amp;lt;&amp;lt;get rows where(Col Maximum(:NPN1)==:NPN1))[1];
show(MaxRow);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jan 2018 18:12:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49559#M28184</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-01-11T18:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Return the Row Number of Maximum</title>
      <link>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49560#M28185</link>
      <description>&lt;P&gt;Col Max can return the max value in a column.&amp;nbsp; Here's how you can find the row and use it to return the corresponding value in a different column using the&amp;nbsp;Big Class sample data set:&lt;/P&gt;&lt;PRE&gt;dt = Current Data Table();

max_row = dt &amp;lt;&amp;lt; Get Rows Where(:height == Col Max(:height));
dt:weight[max_row]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 18:18:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49560#M28185</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-01-11T18:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Return the Row Number of Maximum</title>
      <link>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49561#M28186</link>
      <description>&lt;P&gt;Beat me to it.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 18:19:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49561#M28186</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-01-11T18:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Return the Row Number of Maximum</title>
      <link>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49582#M28203</link>
      <description>&lt;P&gt;Can I do this only using the formula editor?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 00:20:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49582#M28203</guid>
      <dc:creator>Hegedus</dc:creator>
      <dc:date>2018-01-12T00:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Return the Row Number of Maximum</title>
      <link>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49583#M28204</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3711"&gt;@Hegedus&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Can I do this only using the formula editor?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sure.&amp;nbsp; Find the row with max value for column X1 and return the corresponding value for X2:&lt;/P&gt;&lt;PRE&gt;:X2[Current Data Table() &amp;lt;&amp;lt; Get Rows Where( Col Maximum( :X1 ) == :X1 )]&lt;/PRE&gt;&lt;P&gt;You can copy that right into the formula editor and it will work.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 00:50:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49583#M28204</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-01-12T00:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Return the Row Number of Maximum</title>
      <link>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49585#M28205</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Slightly tweaked but this is what I have and it seems to work.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Col Max Formula.png" style="width: 882px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8918i5BE4EBB545DF897E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Col Max Formula.png" alt="Col Max Formula.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 01:06:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Return-the-Row-Number-of-Maximum/m-p/49585#M28205</guid>
      <dc:creator>Hegedus</dc:creator>
      <dc:date>2018-01-12T01:06:05Z</dc:date>
    </item>
  </channel>
</rss>

