<?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 How to get last entry of raw? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-get-last-entry-of-raw/m-p/805483#M98374</link>
    <description>&lt;P&gt;I have multiple measurement for a same part number in a raw. How can I get last entry in a one column.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ConfidenceOwl94_1-1728954398637.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69103i570C508EF4A4289F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ConfidenceOwl94_1-1728954398637.png" alt="ConfidenceOwl94_1-1728954398637.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2024 01:07:09 GMT</pubDate>
    <dc:creator>ConfidenceOwl94</dc:creator>
    <dc:date>2024-10-15T01:07:09Z</dc:date>
    <item>
      <title>How to get last entry of raw?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-last-entry-of-raw/m-p/805483#M98374</link>
      <description>&lt;P&gt;I have multiple measurement for a same part number in a raw. How can I get last entry in a one column.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ConfidenceOwl94_1-1728954398637.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69103i570C508EF4A4289F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ConfidenceOwl94_1-1728954398637.png" alt="ConfidenceOwl94_1-1728954398637.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 01:07:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-last-entry-of-raw/m-p/805483#M98374</guid>
      <dc:creator>ConfidenceOwl94</dc:creator>
      <dc:date>2024-10-15T01:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get last entry of raw?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-last-entry-of-raw/m-p/805494#M98375</link>
      <description>&lt;P&gt;this might work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// make a column to hold results, it will be last column
dt &amp;lt;&amp;lt; newcolumn("answer");
for(irow=1,irow&amp;lt;=nrows(dt),irow+=1,
	// assumes columns 1 and 2 and last are NOT data...
	// grab one row at a time...
	vec = dt[irow, 3::(ncols(dt)-1)];
	// get indexes (loc) of non-missing values...pick the right-most (max)
	nonmissindex = max(loc(vec));
	// handle possible edge case (no data)
	value = if(ismissing(nonmissindex),.,vec[nonmissindex]);
	// fill in the answers
	dt:answer[irow] = value;
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you turn this into a column formula, you'll want to list the source columns explicitly for table updates and not needing dt.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( "answer",
	formula(
		vec = run_1 || run_2 || run_3 || run_4;
		nonmissindex = Max( Loc( vec ) );
		If( Is Missing( nonmissindex ),
			.  // missing if all missing 
               , //
			vec[nonmissindex]
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As a formula, the answer column will update when the data changes.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 02:42:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-last-entry-of-raw/m-p/805494#M98375</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2024-10-15T02:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get last entry of raw?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-last-entry-of-raw/m-p/805495#M98376</link>
      <description>&lt;P&gt;Here is the formula I cam up with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
x = Row();
col = Length( Loc( dt[x, Index( 3, 6 )] ) ) + 2;
dt[x, col];&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Oct 2024 03:09:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-last-entry-of-raw/m-p/805495#M98376</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-10-15T03:09:25Z</dc:date>
    </item>
  </channel>
</rss>

