<?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: Eval Expr not working in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935135#M109089</link>
    <description>&lt;P&gt;You could also use the below code. It will create column references which look as if the column was added in Formula Editor.&lt;BR /&gt;One of the benefits: when the input column is renamed, the formula still works.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();

colNames = dt &amp;lt;&amp;lt; get column names( continuous, string );

// Loop through all columns
For each( {col}, colNames,
Eval(
	Eval Expr(	
		New Column(
			col || "_Gouge",
			Numeric,
			"Continuous",
			Format( "Best", 10 ),
			Formula( (Mean( Expr(Name Expr(As Column(  col ) )) [Index(1, 100)]) + Mean(Expr(Name Expr(As Column(  col ) )) [Index(N Rows() - 99, N Rows())])) / 2 - Col Minimum(Expr(Name Expr(As Column(  col )) )) )
			);
		)
	);
);
	&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Mar 2026 21:45:06 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2026-03-12T21:45:06Z</dc:date>
    <item>
      <title>Eval Expr not working</title>
      <link>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935081#M109081</link>
      <description>&lt;P&gt;Always confused by this one.&amp;nbsp; I created this formula based on one that worked previously.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Get the current data table
dt = Current Data Table();

colNames = dt &amp;lt;&amp;lt; get column names( continuous, string );

// Loop through all columns
For each( {col}, colNames,
Eval(
	Eval Expr(	
		New Column(
			Expr( col ) || "_Gouge",
			Numeric,
			"Continuous",
			Format( "Best", 10 ),
			Formula( (Mean( As Column( Eval(col) ) [Index(1, 100)]) + Mean(As Column(Eval(col)) [Index(N Rows() - 99, N Rows())])) / 2 - Col Minimum(As Column(Eval(col)) ) )
			);
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Formula appears to remain unevaluated.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 16:17:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935081#M109081</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2026-03-12T16:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Expr not working</title>
      <link>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935115#M109084</link>
      <description>&lt;P&gt;As Column( Eval( col ) ) should be As Column( Expr( col ) );&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 19:15:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935115#M109084</guid>
      <dc:creator>mmarchandFSLR</dc:creator>
      <dc:date>2026-03-12T19:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Expr not working</title>
      <link>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935127#M109086</link>
      <description>&lt;P&gt;Finished thing looks like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Get the current data table
dt = Current Data Table();

colNames = dt &amp;lt;&amp;lt; get column names( continuous, string );

// Loop through all columns
For each( {col}, colNames,
Eval(
	Eval Expr(	
		New Column(
			Expr( col ) || "_Gouge",
			Numeric,
			"Continuous",
			Format( "Best", 10 ),
			Formula( (Mean( As Column( Expr( col ) ) [Index(1, 100)]) + Mean(As Column( Expr( col ) ) [Index(N Rows() - 99, N Rows())])) / 2 - Col Minimum(As Column( Expr( col )) ) )
			);
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2026 20:25:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935127#M109086</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2026-03-12T20:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Eval Expr not working</title>
      <link>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935135#M109089</link>
      <description>&lt;P&gt;You could also use the below code. It will create column references which look as if the column was added in Formula Editor.&lt;BR /&gt;One of the benefits: when the input column is renamed, the formula still works.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();

colNames = dt &amp;lt;&amp;lt; get column names( continuous, string );

// Loop through all columns
For each( {col}, colNames,
Eval(
	Eval Expr(	
		New Column(
			col || "_Gouge",
			Numeric,
			"Continuous",
			Format( "Best", 10 ),
			Formula( (Mean( Expr(Name Expr(As Column(  col ) )) [Index(1, 100)]) + Mean(Expr(Name Expr(As Column(  col ) )) [Index(N Rows() - 99, N Rows())])) / 2 - Col Minimum(Expr(Name Expr(As Column(  col )) )) )
			);
		)
	);
);
	&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2026 21:45:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Eval-Expr-not-working/m-p/935135#M109089</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-03-12T21:45:06Z</dc:date>
    </item>
  </channel>
</rss>

