<?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: Yield Table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/867275#M103004</link>
    <description>&lt;P&gt;Tweaked that to have a selectable Yield Threshold.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ex = New Window( "Enter % Pass Threshold",
	&amp;lt;&amp;lt;modal,
	Panel Box( "Tabulate Parameters Below Threshold",
		H List Box( Text Box( "% Pass:" ), teb = Number Edit Box() )
	),
	teb &amp;lt;&amp;lt; Set Width( 5 ),
	Panel Box( "Options",
		H List Box(
			ok_button = Button Box( "OK", na = teb &amp;lt;&amp;lt; get text ),
			canc_button = Button Box( "Cancel" )
		)
	)
);

If( ex["Button"] == -1,
	teb = Empty();
	Throw();
);
colList = dt &amp;lt;&amp;lt; get column names( numeric, string );
SpecCols = {};
PctPass = {};

For Each({colnames, index}, colList,
spec = Column(dt, colnames) &amp;lt;&amp;lt; get property( "Spec Limits" );
If( !Is Empty( spec ), Insert Into (SpecCols, colnames)));
Failcols = {};
// Loop across the columns and generate the test pass/fails
For Each({colnames, index}, SpecCols,
spec = Column(dt, colnames) &amp;lt;&amp;lt; get property( "Spec Limits" );
        lsl = spec["LSL"]; // Lower Spec Limit
        usl = spec["USL"]; // Upper Spec Limit
 failCount = N Rows( dt &amp;lt;&amp;lt; Get Rows Where((As Column(dt, colnames)[]&amp;lt;lsl) | (As Column(dt, colnames)[]&amp;gt;usl)));
 
 passCount = N Rows( dt &amp;lt;&amp;lt; Get Rows Where((As Column(dt, colnames)[]&amp;gt;lsl) &amp;amp; (As Column(dt, colnames)[]&amp;lt;usl)));
 
 yield = 100 * passCount / (passCount + failCount);
 
 	if(yield &amp;lt; Num( na ),
		Insert Into( Failcols, colnames );
	if(yield &amp;lt; Num( na ),
		Insert Into( PctPass, yield )
 
 );
 );
 );

Show( Failcols );


New Table( "Prevalent Failures",
	Add Rows( 0 ),
	New Column( "Failing Parameters", Character, "Nominal", Set Values( Failcols ) ),
	New Column( "% Passing",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( PctPass )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 09 Apr 2025 22:18:10 GMT</pubDate>
    <dc:creator>SpannerHead</dc:creator>
    <dc:date>2025-04-09T22:18:10Z</dc:date>
    <item>
      <title>Yield Table</title>
      <link>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/867243#M103000</link>
      <description>&lt;P&gt;I am trying to get a Yield table using a table having embedded spec limits.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For some reason the count of rows part isn't giving anything but zero.&amp;nbsp; Any clue what I'm doing wrong&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Clear Globals();

dt = Current Data Table();

dtYield = New Table( "Yield Table",
    New Column( "Column Name", Character, "Nominal" ),
    New Column( "Pass Count", Numeric, "Continuous" ),
    New Column( "Fail Count", Numeric, "Continuous" ),
    New Column( "Yield (Percent)", Numeric, "Continuous", Format( "Percent", 12 ) )
);

// Get all numeric columns
colList = dt &amp;lt;&amp;lt; get column names( numeric, string );

// Loop across the columns and generate the test pass/fails
Try(For( i = 1, i &amp;lt;= N Items( colList ), i++,
	spec = As Column( dt, colList[i] ) &amp;lt;&amp;lt; get property( "Spec Limits" );
	//Establish the Notes Value from the Parent Column
	dt &amp;lt;&amp;lt; clear select;
	
    If( !Is Empty( specs ),
        /* Extract spec limits */
        lsl = spec["LSL"]; // Lower Spec Limit
        usl = spec["USL"]; // Upper Spec Limit
        
        /* Step 5: Evaluate pass and fail counts */
        failCount = N Rows( dt &amp;lt;&amp;lt; Get Rows Where( Column(dt, colList[i]) &amp;lt;= lsl)) + N Rows( dt &amp;lt;&amp;lt; Get Rows Where( Column(dt, colList[i]) &amp;gt;= usl));
        passCount = N Rows( dt &amp;lt;&amp;lt; Get Rows Where( Column(dt, colList[i]) &amp;gt; lsl &amp;amp; Column(dt, colList[i]) &amp;lt; usl ) );
        
        /* Step 6: Calculate yield */
        yield = 100 * passCount / (passCount + failCount);
        
        Show(yield);

        /* Step 7: Add results to the yield table */
        dtYield &amp;lt;&amp;lt; Add Rows(1);
        dtYield:Column Name[ N Rows( dtYield ) ] = As Column(colList[i]) &amp;lt;&amp;lt; Get Name();
        dtYield:Pass Count[ N Rows( dtYield ) ] = passCount;
        dtYield:Fail Count[ N Rows( dtYield ) ] = failCount;
        dtYield:Yield (Percent)[ N Rows( dtYield ) ] = yield;
  );
);&lt;BR /&gt;);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 19:43:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/867243#M103000</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-04-09T19:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Yield Table</title>
      <link>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/867264#M103002</link>
      <description>&lt;P&gt;I came up with this if anyone has a better suggestion?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Clear Globals();

dt = Current Data Table();

dtYield = New Table( "Yield Table",
    Add Rows(1),
    New Column( "Column Name", Character, "Nominal" ),
    New Column( "Pass Count", Numeric, "Continuous" ),
    New Column( "Fail Count", Numeric, "Continuous" ),
    New Column( "Yield", Numeric, "Continuous" ),
 
);

// Get all numeric columns
colList = dt &amp;lt;&amp;lt; get column names( numeric, string );
SpecCols ={};

For Each({colnames, index}, colList,
spec = Column(dt, colnames) &amp;lt;&amp;lt; get property( "Spec Limits" );
If( !Is Empty( spec ), Insert Into (SpecCols, colnames)));

// Loop across the columns and generate the test pass/fails
For Each({colnames, index}, SpecCols,
spec = Column(dt, colnames) &amp;lt;&amp;lt; get property( "Spec Limits" );
        lsl = spec["LSL"]; // Lower Spec Limit
        usl = spec["USL"]; // Upper Spec Limit
 failCount = N Rows( dt &amp;lt;&amp;lt; Get Rows Where((As Column(dt, colnames)[]&amp;lt;lsl) | (As Column(dt, colnames)[]&amp;gt;usl)));
 
 passCount = N Rows( dt &amp;lt;&amp;lt; Get Rows Where((As Column(dt, colnames)[]&amp;gt;lsl) &amp;amp; (As Column(dt, colnames)[]&amp;lt;usl)));
 
 yield = 100 * passCount / (passCount + failCount);
 
 show(failCount);
 show(passCount);
 show(yield);
        
dtYield:Column Name[ N Rows( dtYield ) ] = As Column(dt, colnames) &amp;lt;&amp;lt; Get Name();
dtYield:Pass Count[ N Rows( dtYield ) ] = passCount;
dtYield:Fail Count[ N Rows( dtYield ) ] = failCount;
dtYield:Yield[ N Rows( dtYield ) ] = yield;
Data Table ( "Yield Table" ) &amp;lt;&amp;lt; Add Rows(1);
 
);
	&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Apr 2025 21:15:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/867264#M103002</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-04-09T21:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Yield Table</title>
      <link>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/867275#M103004</link>
      <description>&lt;P&gt;Tweaked that to have a selectable Yield Threshold.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ex = New Window( "Enter % Pass Threshold",
	&amp;lt;&amp;lt;modal,
	Panel Box( "Tabulate Parameters Below Threshold",
		H List Box( Text Box( "% Pass:" ), teb = Number Edit Box() )
	),
	teb &amp;lt;&amp;lt; Set Width( 5 ),
	Panel Box( "Options",
		H List Box(
			ok_button = Button Box( "OK", na = teb &amp;lt;&amp;lt; get text ),
			canc_button = Button Box( "Cancel" )
		)
	)
);

If( ex["Button"] == -1,
	teb = Empty();
	Throw();
);
colList = dt &amp;lt;&amp;lt; get column names( numeric, string );
SpecCols = {};
PctPass = {};

For Each({colnames, index}, colList,
spec = Column(dt, colnames) &amp;lt;&amp;lt; get property( "Spec Limits" );
If( !Is Empty( spec ), Insert Into (SpecCols, colnames)));
Failcols = {};
// Loop across the columns and generate the test pass/fails
For Each({colnames, index}, SpecCols,
spec = Column(dt, colnames) &amp;lt;&amp;lt; get property( "Spec Limits" );
        lsl = spec["LSL"]; // Lower Spec Limit
        usl = spec["USL"]; // Upper Spec Limit
 failCount = N Rows( dt &amp;lt;&amp;lt; Get Rows Where((As Column(dt, colnames)[]&amp;lt;lsl) | (As Column(dt, colnames)[]&amp;gt;usl)));
 
 passCount = N Rows( dt &amp;lt;&amp;lt; Get Rows Where((As Column(dt, colnames)[]&amp;gt;lsl) &amp;amp; (As Column(dt, colnames)[]&amp;lt;usl)));
 
 yield = 100 * passCount / (passCount + failCount);
 
 	if(yield &amp;lt; Num( na ),
		Insert Into( Failcols, colnames );
	if(yield &amp;lt; Num( na ),
		Insert Into( PctPass, yield )
 
 );
 );
 );

Show( Failcols );


New Table( "Prevalent Failures",
	Add Rows( 0 ),
	New Column( "Failing Parameters", Character, "Nominal", Set Values( Failcols ) ),
	New Column( "% Passing",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( PctPass )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Apr 2025 22:18:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/867275#M103004</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2025-04-09T22:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: Yield Table</title>
      <link>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/868191#M103119</link>
      <description>&lt;P class="" data-start="582" data-end="785"&gt;Hi there,&lt;BR data-start="591" data-end="594" /&gt;If you're working with spec limits and yield tables, there's actually a short tutorial that shows how this can be done without scripting — in case you're looking for a more ready-to-use approach.&lt;/P&gt;
&lt;P class="" data-start="787" data-end="1108"&gt;&lt;A href="https://www.youtube.com/watch?v=1CjmA2hZhdg&amp;amp;t=315s" target="_blank"&gt;https://www.youtube.com/watch?v=1CjmA2hZhdg&amp;amp;t=315s&lt;/A&gt;&amp;nbsp;&lt;BR data-start="881" data-end="884" /&gt;YieldOptiX is a JMP-based add-in that automates spec limit handling, yield summaries, and binning reports. It's typically used with test data, but the same ideas apply to any structured dataset with specs and measurements.&lt;/P&gt;
&lt;P class="" data-start="1110" data-end="1225"&gt;Just thought I’d share in case you're interested in exploring something more turn-key alongside your own workflows.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Apr 2025 19:53:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Yield-Table/m-p/868191#M103119</guid>
      <dc:creator>PercentileSeal4</dc:creator>
      <dc:date>2025-04-14T19:53:59Z</dc:date>
    </item>
  </channel>
</rss>

