<?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 for calculating averages of values in two consecutive rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468565#M71235</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;if(mod(row(),2)==0,
mean(:raw_result,lag(:raw_result)),
.
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will calculate the average for every even numbered row and a missing value for each odd numbered row.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 19:04:49 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-03-10T19:04:49Z</dc:date>
    <item>
      <title>Formula for calculating averages of values in two consecutive rows</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468424#M71223</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I would like to calculate averages of two consecutive values in separate rows and I have table with 1000 rows.&amp;nbsp;&amp;nbsp;What formula can I use to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:45:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468424#M71223</guid>
      <dc:creator>VR</dc:creator>
      <dc:date>2023-06-10T23:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for calculating averages of values in two consecutive rows</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468438#M71225</link>
      <description>&lt;P&gt;I think Col Moving Average should be able to do it &lt;A href="https://www.jmp.com/support/help/en/16.2/#page/jmp/statistical-functions-2.shtml?os=win&amp;amp;source=application&amp;amp;utm_source=helpmenu&amp;amp;utm_medium=application#ww6133391" target="_blank" rel="noopener"&gt;Col Moving Average (jmp.com help)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From scripting index:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1646930018578.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/40713i1934F5DC143298D9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1646930018578.png" alt="jthi_0-1646930018578.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 16:34:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468438#M71225</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-03-10T16:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for calculating averages of values in two consecutive rows</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468443#M71226</link>
      <description>&lt;P&gt;The previous posted option will work great. You might also consider the Lag() function within the Mean() formula to reference the previous row, so it would read something like the below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Mean( :Column, Lag( :Column ) )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 16:40:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468443#M71226</guid>
      <dc:creator>Joseph_Reese</dc:creator>
      <dc:date>2022-03-10T16:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for calculating averages of values in two consecutive rows</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468533#M71231</link>
      <description>&lt;P&gt;thanks for the quick response.&amp;nbsp; I used the formula below:&lt;/P&gt;&lt;P&gt;Col Moving Average( :raw_result, 1, 1, 0 )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;96&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;U&gt;96&lt;/U&gt;&lt;/P&gt;&lt;P&gt;93&amp;nbsp; &amp;nbsp; &amp;nbsp;94.5&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp;&lt;U&gt;96.5&lt;/U&gt;&lt;/P&gt;&lt;P&gt;110&amp;nbsp; &amp;nbsp;105&lt;/P&gt;&lt;P&gt;How do i change the formula to get rid of the two underlined values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 18:30:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468533#M71231</guid>
      <dc:creator>VR</dc:creator>
      <dc:date>2022-03-10T18:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for calculating averages of values in two consecutive rows</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468537#M71232</link>
      <description>&lt;P&gt;Thanks, I will try this as well&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 18:31:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468537#M71232</guid>
      <dc:creator>VR</dc:creator>
      <dc:date>2022-03-10T18:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for calculating averages of values in two consecutive rows</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468565#M71235</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;if(mod(row(),2)==0,
mean(:raw_result,lag(:raw_result)),
.
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This will calculate the average for every even numbered row and a missing value for each odd numbered row.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 19:04:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468565#M71235</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-03-10T19:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for calculating averages of values in two consecutive rows</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468571#M71236</link>
      <description>&lt;P&gt;Thanks so much, this worked.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 19:09:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-for-calculating-averages-of-values-in-two-consecutive/m-p/468571#M71236</guid>
      <dc:creator>VR</dc:creator>
      <dc:date>2022-03-10T19:09:37Z</dc:date>
    </item>
  </channel>
</rss>

