<?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: Last column,Col Value(NCol()-1) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922439#M108128</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You have to specify a&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(  Col Value( Column( N Col() - 1 ) )== "PASS"),
	1,
	0
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;column in your formula as shown below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jan 2026 18:55:10 GMT</pubDate>
    <dc:creator>Thierry_S</dc:creator>
    <dc:date>2026-01-07T18:55:10Z</dc:date>
    <item>
      <title>Last column,Col Value(NCol()-1)</title>
      <link>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922428#M108126</link>
      <description>&lt;P&gt;I have data tables where the number of columns vary, but the last column in each table holds information such as "PASS" and "FAIL" where I want to create a new column in each table where if it is PASS then replace with numeric 1, and Fail numeric 0 with an IF statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried&lt;/P&gt;
&lt;P&gt;New column with formula Col Value(NCol()-1) and it does not work.&amp;nbsp; &amp;nbsp;If I replace with a hard coded column value e.g., Col Value(9) it returns the pass/fail and I can use an IF statement to change to the numeric values, but I really need the NCol()-1 to paste into all the tables as the last column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I make the formula work?&lt;/P&gt;
&lt;P&gt;IF (Col Value(NCol()-1) = "PASS", 1, 0);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 18:44:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922428#M108126</guid>
      <dc:creator>justvince</dc:creator>
      <dc:date>2026-01-07T18:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Last column,Col Value(NCol()-1)</title>
      <link>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922438#M108127</link>
      <description>&lt;P&gt;I don't really suggest doing something like this, but the formula would most likely look something like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(Column(N Col() - 1)[Row()] == "PASS",
	1,
	0
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(As Column(N Col() - 1) == "PASS",
	1,
	0
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Jan 2026 18:53:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922438#M108127</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-01-07T18:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Last column,Col Value(NCol()-1)</title>
      <link>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922439#M108128</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You have to specify a&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(  Col Value( Column( N Col() - 1 ) )== "PASS"),
	1,
	0
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;column in your formula as shown below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jan 2026 18:55:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922439#M108128</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2026-01-07T18:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Last column,Col Value(NCol()-1)</title>
      <link>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922440#M108129</link>
      <description>&lt;P&gt;I found the solution using EVAL()&lt;/P&gt;
&lt;DIV&gt;If( Col Value( Eval( N Col() - 1 ) ) == "PASS",&lt;SPAN&gt; 1,&lt;/SPAN&gt;&lt;SPAN&gt; 0&lt;/SPAN&gt;)&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Jan 2026 18:55:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922440#M108129</guid>
      <dc:creator>justvince</dc:creator>
      <dc:date>2026-01-07T18:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Last column,Col Value(NCol()-1)</title>
      <link>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922452#M108130</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;'s approach is better documented.&lt;/P&gt;
&lt;DIV&gt;Can someone explain what &lt;CODE&gt;col value()&lt;/CODE&gt; does, or share a link to the documentation?&lt;/DIV&gt;
&lt;P&gt;&lt;STRIKE&gt;Wow,&lt;/STRIKE&gt; &lt;FONT face="courier new,courier"&gt;Eval()&lt;/FONT&gt; works?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Col Value in Formula Editor:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1767820776908.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/90370iBC80EEC243F243BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1767820776908.png" alt="hogi_1-1767820776908.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hover Tip in Formula Editor: nothing&lt;/P&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1767820734502.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/90369i3E232F9A619390D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1767820734502.png" alt="hogi_0-1767820734502.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Jan 2026 06:11:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922452#M108130</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-01-08T06:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Last column,Col Value(NCol()-1)</title>
      <link>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922492#M108131</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
:height &amp;lt;&amp;lt; 	Set Property( "Missing Value Codes", {59} );

row()=1;
Show(col value("height")); //.&lt;BR /&gt;as column("height"); //.
Show(col stored value("height")); // 59

// accepts strings, columns, names ... as argument&lt;BR /&gt;//row=40
Show(col value("height",40));
Show(col value(:height,40));
Show(col value(5,40));
Show(col value(Column("height"),40));&lt;BR /&gt;Show(col value(As Column("height"),40));
As Column("height")[40];


// doesn't accept Expressions -&amp;gt; fix via Eval
Show(col value(2+2)); // ␀
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2026 07:28:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Last-column-Col-Value-NCol-1/m-p/922492#M108131</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-01-08T07:28:33Z</dc:date>
    </item>
  </channel>
</rss>

