<?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: Add result column based on diffent binning result in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800527#M97617</link>
    <description>&lt;P&gt;It might be enough if you add :SN to the result and modify Col Number slightly (or even better change it to col sum of one)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(1, :SN, :Run),
	"Pass"
,
	:Bin[Col Min(If(:Bin != "Pass", Row(), .), :SN)]
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2024 19:50:12 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-09-19T19:50:12Z</dc:date>
    <item>
      <title>Add result column based on diffent binning result</title>
      <link>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800448#M97603</link>
      <description>&lt;P&gt;I am not sure if this is even possible. I am trying to add final result column. In that I want to output first failure mode. Also if device pass in a retest I need pass as a result.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ConfidenceOwl94_0-1726767229729.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68462i5F571EAE3540BDB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ConfidenceOwl94_0-1726767229729.png" alt="ConfidenceOwl94_0-1726767229729.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 17:36:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800448#M97603</guid>
      <dc:creator>ConfidenceOwl94</dc:creator>
      <dc:date>2024-09-19T17:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add result column based on diffent binning result</title>
      <link>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800462#M97605</link>
      <description>&lt;P&gt;Is it possible that SN is retested from good to bad?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;Going with the assumption of no&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/Sample1.jmp");
dt &amp;lt;&amp;lt; new column("OK", Character, Nominal, Formula(
	If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(:SN, :Run),
		"Pass"
	,
		:Bin[Col Min(If(:Bin != "Pass", Row(), .))];
	);
));


dt = Open("$DOWNLOADS/Sample2.jmp");
dt &amp;lt;&amp;lt; new column("OK", Character, Nominal, Formula(
	If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(:SN, :Run),
		"Pass"
	,
		:Bin[Col Min(If(:Bin != "Pass", Row(), .))];
	);
));

Write();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will create "OK" column for you from which you can get the formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(:SN, :Run),
	"Pass",
	:Bin[Col Min(If(:Bin != "Pass", Row(), .))]
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Sep 2024 18:17:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800462#M97605</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-09-19T18:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add result column based on diffent binning result</title>
      <link>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800526#M97616</link>
      <description>&lt;P&gt;Yes, you are right. It should not be possible. But it is possible because of tester error or instrument with poor GRR. Chances are really low and we can ignore that possibility for now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solution you gave did work for the given example. But when I applied it to with multiple SN, It did not worked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ConfidenceOwl94_0-1726774872351.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68475i4C9476C36F9EA633/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ConfidenceOwl94_0-1726774872351.png" alt="ConfidenceOwl94_0-1726774872351.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 19:43:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800526#M97616</guid>
      <dc:creator>ConfidenceOwl94</dc:creator>
      <dc:date>2024-09-19T19:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add result column based on diffent binning result</title>
      <link>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800527#M97617</link>
      <description>&lt;P&gt;It might be enough if you add :SN to the result and modify Col Number slightly (or even better change it to col sum of one)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(Col Max(Col Sum(:Bin == "Pass", :SN, :Run), :SN) == Col Number(1, :SN, :Run),
	"Pass"
,
	:Bin[Col Min(If(:Bin != "Pass", Row(), .), :SN)]
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 19:50:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-result-column-based-on-diffent-binning-result/m-p/800527#M97617</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-09-19T19:50:12Z</dc:date>
    </item>
  </channel>
</rss>

