<?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: Calculation across rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6642#M6636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This are not specific answers but here are some potentially helpful ideas to get you started:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Check out the Dif() and Lag() operators to use in a formula&lt;/LI&gt;&lt;LI&gt;Create column C with a formula that copies of the value in column A if a condition in column B is met otherise leave as empty "."&lt;/LI&gt;&lt;LI&gt;Use the Split() function&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Apr 2013 15:06:06 GMT</pubDate>
    <dc:creator>jeff3928</dc:creator>
    <dc:date>2013-04-29T15:06:06Z</dc:date>
    <item>
      <title>Calculation across rows</title>
      <link>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6641#M6635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to do calculations across rows. How for instance do I:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;devide a number i column A, row 1 with a number in column B, row 2?&lt;/LI&gt;&lt;LI&gt;calculate the standard deviation of the numbers in column A, which fulfill a criteria based on the content on column B (not via the "X By Y", but directly in the table).&lt;/LI&gt;&lt;LI&gt;Convert row to columns, that is create a column for each value in column A, with the value in column B.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 12:18:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6641#M6635</guid>
      <dc:creator>JesperJohansen</dc:creator>
      <dc:date>2013-04-29T12:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation across rows</title>
      <link>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6642#M6636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This are not specific answers but here are some potentially helpful ideas to get you started:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Check out the Dif() and Lag() operators to use in a formula&lt;/LI&gt;&lt;LI&gt;Create column C with a formula that copies of the value in column A if a condition in column B is met otherise leave as empty "."&lt;/LI&gt;&lt;LI&gt;Use the Split() function&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 15:06:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6642#M6636</guid>
      <dc:creator>jeff3928</dc:creator>
      <dc:date>2013-04-29T15:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation across rows</title>
      <link>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6643#M6637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although the JMP data table is not a "free-form" spreadsheet like an Excel sheet (e.g a column can only contain data of a single data type and formulas are applied to the entire column) all of the above is possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;devide a number i column A, row 1 with a number in column B, row 2?&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The column formula &lt;EM&gt;:A[1] / :B[2]&lt;/EM&gt; applies that particular ratio to all rows.&lt;/P&gt;&lt;P&gt;The column formula &lt;EM&gt;:A / :B[Row() + 1]&lt;/EM&gt; give each row the ratio between the current value of A with the next row value of B.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;calculate the standard deviation of the numbers in column A, which fulfill a criteria based on the content on column B (not via the "X By Y", but directly in the table).&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The column formula &lt;EM&gt;Col Std Dev( :A, :B ) &lt;/EM&gt;gives the standard deviation of values in A for each level of B. More complex criteria can be acccomplished but may involve an intermediate column that categorize B.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Convert row to columns, that is create a column for each value in column A, with the value in column B.&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Use the Transpose command in the Tables menu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With JSL script you'll have many more options than the above examples based on column formulas.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 15:10:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6643#M6637</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2013-04-29T15:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation across rows</title>
      <link>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6644#M6638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@MS:&lt;/P&gt;&lt;P&gt;Thank you for your reply. That helped me a great deal. However I have run into a new problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a function to return the row number of a row in which a cell in a give column meets a certain criteria. E.g.:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Return the row number of the cell in Column 1 with the value "A". Assuming "A" appear only once in the data set.&lt;/LI&gt;&lt;LI&gt;Return the row number of the previous (or next) row, relative to the row in which the formula result is displayed, in which the value in Column 1 is "A". "A" may appear several times in the data set.&lt;/LI&gt;&lt;LI&gt;Return the row number of the cell in Column 1 with the value is closest to a given number.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 11:31:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6644#M6638</guid>
      <dc:creator>JesperJohansen</dc:creator>
      <dc:date>2013-05-08T11:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation across rows</title>
      <link>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6645#M6639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the &lt;STRONG&gt;get rows where&lt;/STRONG&gt; capability:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;open&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"$sample_data\Big Class.jmp"&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black;"&gt;match_rows &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black;"&gt; dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black;"&gt; get rows where&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black;"&gt;sex &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: navy;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: purple;"&gt;"F"&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: #0000dd;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: black;"&gt;match_rows&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;[1, 2, 3, 4, 5, 9, 10, 11, 16, 17, 18, 19, 20, 28, 29, 35, 36, 38]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The match_rows variable is a matrix that you can reference by the index.&amp;nbsp; I.e. match_rows[1] is the first element, etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 13:19:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6645#M6639</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2013-05-08T13:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation across rows</title>
      <link>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6646#M6640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@PMroz:&lt;/P&gt;&lt;P&gt;Thank you. I'm sorry, but I'm not experienced in the scripting side of JMP. I don't quite understand your answer. Is there any way to do perform the above mentioned actions directly in the Formula editor?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2013 09:02:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calculation-across-rows/m-p/6646#M6640</guid>
      <dc:creator>JesperJohansen</dc:creator>
      <dc:date>2013-05-14T09:02:13Z</dc:date>
    </item>
  </channel>
</rss>

