<?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: Formula Editor: help with using Subscript function dynamically in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Formula-Editor-help-with-using-Subscript-function-dynamically/m-p/970092#M110512</link>
    <description>&lt;P&gt;Col At() was added in JMP19 and it allows you to look for values of specific indexes within groups. So you can use that if Control rows are always before Tests&amp;nbsp;(Column 3 is Result and Column 1 is Group)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col At(:Column 3, 1, :Column 1)&lt;/CODE&gt;&lt;/PRE&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="jthi_0-1789014294613.png"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/116292iD084095591FE5B73/image-size/medium?v=v2&amp;amp;px=400" alt="jthi_0-1789014294613.png" title="jthi_0-1789014294613.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Scripting Index has more examples.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Sep 2026 04:25:17 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2026-09-10T04:25:17Z</dc:date>
    <item>
      <title>Formula Editor: help with using Subscript function dynamically</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor-help-with-using-Subscript-function-dynamically/m-p/970045#M110509</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I'm trying to compare across rows in my data table in a generalizable manner. To do this, I'd like to create a formula column that finds and returns a value from a specific row with certain traits.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sowiakg_1-1788989884725.png"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/116267i87BE4947D3E7E29D/image-size/medium?v=v2&amp;amp;px=400" alt="sowiakg_1-1788989884725.png" title="sowiakg_1-1788989884725.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this example screenshot, I would like the "Control Result" to be a formula column that returns the "Control" row with a matching "Donor" field, and return the corresponding "Result" score.&amp;nbsp;I would like to use Formula Editor for this, and the most intuitive way I can think to return data from another row is to use Subscript.&lt;/P&gt;
&lt;P&gt;However, I am not sure how to properly create the logic for "i = (lowest) row with matching Group and Condition='Control'". What formula block (or combination thereof) can be used to return "i = the row number that matches X conditions"?&amp;nbsp;Might there also be some byVar trick I should use here?&lt;/P&gt;
&lt;P&gt;As an aside: I know Match is another option, however it seems to require writing out the "Control" values in the formula block itself (or bespoke Subscript calls) for each Group. I am trying to replicate this workflow across a much larger dataset and would prefer to minimize hardcoded values. I also work with a lot of non-coder collaborators and would like to avoid JSL; and only need to swap out the Condition and Result fields as necessary using the Formula Editor.&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2026 21:54:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor-help-with-using-Subscript-function-dynamically/m-p/970045#M110509</guid>
      <dc:creator>sowiakg</dc:creator>
      <dc:date>2026-09-09T21:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Editor: help with using Subscript function dynamically</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor-help-with-using-Subscript-function-dynamically/m-p/970079#M110511</link>
      <description>&lt;P&gt;Here is the formula I came up with:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum( If( :Condition == "Control", :Result ), :Group )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1789008517877.png"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/116280i5E804E74A69174B5/image-size/medium?v=v2&amp;amp;px=400" alt="txnelson_0-1789008517877.png" title="txnelson_0-1789008517877.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2026 02:48:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor-help-with-using-Subscript-function-dynamically/m-p/970079#M110511</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2026-09-10T02:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Editor: help with using Subscript function dynamically</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor-help-with-using-Subscript-function-dynamically/m-p/970092#M110512</link>
      <description>&lt;P&gt;Col At() was added in JMP19 and it allows you to look for values of specific indexes within groups. So you can use that if Control rows are always before Tests&amp;nbsp;(Column 3 is Result and Column 1 is Group)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col At(:Column 3, 1, :Column 1)&lt;/CODE&gt;&lt;/PRE&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="jthi_0-1789014294613.png"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/116292iD084095591FE5B73/image-size/medium?v=v2&amp;amp;px=400" alt="jthi_0-1789014294613.png" title="jthi_0-1789014294613.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Scripting Index has more examples.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Sep 2026 04:25:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor-help-with-using-Subscript-function-dynamically/m-p/970092#M110512</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-09-10T04:25:17Z</dc:date>
    </item>
  </channel>
</rss>

