<?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 How to get a average for part of column data by using formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105022#M38837</link>
    <description>&lt;P&gt;For example, I have a column:&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;50&lt;/P&gt;&lt;P&gt;60&lt;/P&gt;&lt;P&gt;70&lt;/P&gt;&lt;P&gt;would like to get the average for every 3 rows, and put the average in a new column in first row in every set by using formua, like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;50&amp;nbsp; 60&lt;/P&gt;&lt;P&gt;60&lt;/P&gt;&lt;P&gt;70&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Jan 2019 22:17:44 GMT</pubDate>
    <dc:creator>jasongao</dc:creator>
    <dc:date>2019-01-08T22:17:44Z</dc:date>
    <item>
      <title>How to get a average for part of column data by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105022#M38837</link>
      <description>&lt;P&gt;For example, I have a column:&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;50&lt;/P&gt;&lt;P&gt;60&lt;/P&gt;&lt;P&gt;70&lt;/P&gt;&lt;P&gt;would like to get the average for every 3 rows, and put the average in a new column in first row in every set by using formua, like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; 3&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;4&lt;/P&gt;&lt;P&gt;50&amp;nbsp; 60&lt;/P&gt;&lt;P&gt;60&lt;/P&gt;&lt;P&gt;70&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 22:17:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105022#M38837</guid>
      <dc:creator>jasongao</dc:creator>
      <dc:date>2019-01-08T22:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a average for part of column data by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105041#M38838</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/13583"&gt;@jasongao&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;One way would be something like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;You will need to extract your data from column into a matrix. You can do that using &amp;lt;&amp;lt; get as matrix command.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Mat = [2,3,4,50,60,70] ; 

NewMat = Transpose(Shape(Mat,(N Rows(Mat) * N Cols(Mat))/3,3 )); 

V Mean((NewMat)); &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jan 2019 22:41:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105041#M38838</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2019-01-08T22:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a average for part of column data by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105043#M38840</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(Modulo(Row(), 3) == 1,
    Col Mean(:Column 1, Ceiling(Row() / 3))
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Jan 2019 23:15:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105043#M38840</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2019-01-08T23:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a average for part of column data by using formula</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105052#M38841</link>
      <description>&lt;P&gt;Thanks! It works!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 00:35:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-get-a-average-for-part-of-column-data-by-using-formula/m-p/105052#M38841</guid>
      <dc:creator>jasongao</dc:creator>
      <dc:date>2019-01-09T00:35:53Z</dc:date>
    </item>
  </channel>
</rss>

