<?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: Calculating Yield using Tabulate in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/527176#M75109</link>
    <description>&lt;P&gt;It might be easier to calculate yield by using Summary instead of tabulate:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1658944191872.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44380iE27DDD7951B27A93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1658944191872.png" alt="jthi_1-1658944191872.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you want to use tabulate it might be easiest by using % Coluimn or % Row depending on how your data is formatted and still you might end up with a bit weird looking table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1658944094800.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44379i340566C90C4DA50E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1658944094800.png" alt="jthi_0-1658944094800.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 17:50:05 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-07-27T17:50:05Z</dc:date>
    <item>
      <title>Calculating Yield using Tabulate</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/527159#M75105</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently trying to write a script that will automatically calculate yields of tests across temperatures. I've replaced all "Pass" with 1's and "Fail" with a 0 throughout the table then calculated the sum. Below is my current Tabulate window and the code for this. My goal is to have a third column for each temperature with the yield which is&amp;nbsp; = ((Sum at Temp)/(N at Temp)) x 100. I'm having difficulties implementing this. I figure there is either a way to do this in Tabulate or to insert a Yield column after each "N" column and calculate the yield using the previous two columns in a formula, but am having trouble thinking how to do that in a way that accounts for a variable number of columns and test temperatures. Any help would be appreciated! Thanks in advance!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;list = dt &amp;lt;&amp;lt; Get Column Names( string );
Remove From(list, 1, testIndex);

yieldByTest = (dt &amp;lt;&amp;lt; Tabulate(
		Add Table(
			Column Table(
				Grouping Columns(:tst_temp),
				Statistics(Sum, N, Mean)
			),
			Row Table(
				Analysis Columns(Eval(list))
			)
		),invisible
	)
) &amp;lt;&amp;lt; Make Into data Table;
yieldByTest &amp;lt;&amp;lt; Set Name("Yield by Test Across Temperature");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichaelO_0-1658942858087.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44378iC680FA5A9244611C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichaelO_0-1658942858087.png" alt="MichaelO_0-1658942858087.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:51:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/527159#M75105</guid>
      <dc:creator>MichaelO</dc:creator>
      <dc:date>2023-06-10T23:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Yield using Tabulate</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/527176#M75109</link>
      <description>&lt;P&gt;It might be easier to calculate yield by using Summary instead of tabulate:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1658944191872.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44380iE27DDD7951B27A93/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1658944191872.png" alt="jthi_1-1658944191872.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you want to use tabulate it might be easiest by using % Coluimn or % Row depending on how your data is formatted and still you might end up with a bit weird looking table:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1658944094800.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44379i340566C90C4DA50E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1658944094800.png" alt="jthi_0-1658944094800.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:50:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/527176#M75109</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-07-27T17:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Yield using Tabulate</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/527884#M75163</link>
      <description>&lt;P&gt;I think this can be done like this example below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Georg_0-1659042600705.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44400iBDBC2E3E8F87C9AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Georg_0-1659042600705.png" alt="Georg_0-1659042600705.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// generate yield table
dt1 = New Table( "dt1", add rows( 9 ), New Column( "Process", "Character", values( Repeat( {"A", "B", "C"}, 3 ) ) ) );
dt2 = New Table( "dt2", add rows( 9 ), New Column( "Temperature", "Nominal", values( Repeat( {30, 40, 50}, 3 ) ) ) );
dty = dt1 &amp;lt;&amp;lt; join( with( dt2 ), Cartesian Join );
For Each( {dt}, {dt1, dt2}, Close( dt, "NoSave" ) );
dty &amp;lt;&amp;lt; set name( "yield" );
dty &amp;lt;&amp;lt; New Column( "yield", "Numeric", "Continuous", set each value( Random Integer( 0, 1 ) ) );

// tabulate
dty &amp;lt;&amp;lt; Tabulate(
	Show Control Panel( 0 ),
	Add Table(
		Column Table( Grouping Columns( :Temperature ), Statistics( Sum, N, Mean ), Analysis Columns( :yield ) ),
		Row Table( Grouping Columns( :Process ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Jul 2022 21:11:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/527884#M75163</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2022-07-28T21:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Yield using Tabulate</title>
      <link>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/528265#M75199</link>
      <description>&lt;P&gt;Using the mean makes sense. I can't believe I didn't think of that!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 18:01:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculating-Yield-using-Tabulate/m-p/528265#M75199</guid>
      <dc:creator>MichaelO</dc:creator>
      <dc:date>2022-07-29T18:01:42Z</dc:date>
    </item>
  </channel>
</rss>

