<?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: Creating a delta column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380919#M63139</link>
    <description>&lt;P&gt;You won't have to create such a column, but it is quite easy way to solve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could create formula which would use for example Loc() to get the index of MATCHED PRODUCT and then use that to get value from Mean(Normalized) column. For example something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:Name("Mean(Normalised)") - :Name("Mean(Normalised)")[Loc(:PRODUCT &amp;lt;&amp;lt; get values, "MATCHED")[1]]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I suggest you take a look in the formula menu and see what subexpressions return or break the example into multiple formulas to understand properly what it does (and for example why there is [1] after Loc).&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 16:09:09 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-04-29T16:09:09Z</dc:date>
    <item>
      <title>Creating a delta column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380887#M63132</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I am trying to create a delta column.&lt;/P&gt;&lt;P&gt;the difference is between mean(normalised) - mean(normalised of the "MATCHED" product)&lt;/P&gt;&lt;P&gt;I tried the lag function but this doesnt work as no date.&lt;/P&gt;&lt;P&gt;Would I have to create a new column "Matched_Value" and set all row values to the Same as the MATCHED value&lt;/P&gt;&lt;P&gt;then create my delta = Mean(no...) - Matched...&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="jearls11_0-1619710978314.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32418i38AFFA141CB4FF8A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jearls11_0-1619710978314.png" alt="jearls11_0-1619710978314.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:29:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380887#M63132</guid>
      <dc:creator>jearls11</dc:creator>
      <dc:date>2023-06-10T23:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a delta column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380914#M63138</link>
      <description>&lt;P&gt;This formula is an easy way to do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1,
	matched = :"Mean(Normalised)"n[(Current Data Table() &amp;lt;&amp;lt; get rows where( :PRODUCT == "MATCHED" ))[1]]
);
:"Mean(Normalised)"n - matched;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="matched.PNG" style="width: 589px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32419iF6123A364F9A87FD/image-size/large?v=v2&amp;amp;px=999" role="button" title="matched.PNG" alt="matched.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 16:09:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380914#M63138</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-04-29T16:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a delta column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380919#M63139</link>
      <description>&lt;P&gt;You won't have to create such a column, but it is quite easy way to solve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could create formula which would use for example Loc() to get the index of MATCHED PRODUCT and then use that to get value from Mean(Normalized) column. For example something like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;:Name("Mean(Normalised)") - :Name("Mean(Normalised)")[Loc(:PRODUCT &amp;lt;&amp;lt; get values, "MATCHED")[1]]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I suggest you take a look in the formula menu and see what subexpressions return or break the example into multiple formulas to understand properly what it does (and for example why there is [1] after Loc).&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 16:09:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380919#M63139</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-04-29T16:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a delta column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380950#M63144</link>
      <description>&lt;P&gt;Thank you guys for both formulas&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 17:05:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-delta-column/m-p/380950#M63144</guid>
      <dc:creator>jearls11</dc:creator>
      <dc:date>2021-04-29T17:05:57Z</dc:date>
    </item>
  </channel>
</rss>

