<?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 Creating a running total of a column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8092#M8086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am wondering how to create a column in a JMP table that is the running total of another column (which I may need to reference via the column name as a string). That is, if I have a column with the following data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&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;5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would want to create a column with a formula whose contents would work out to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I have this loop, working from a list of names of columns to take the running total of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;For(i = 2, i &amp;lt;= numCols, i++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; colName = colNames&lt;I&gt;;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; col = New Column("Cumulative " || colName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Formula(Summation(j = 1, Row(), As Column(ColName)&lt;J&gt;))&lt;/J&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This appears to work, but is very slow and if I create multiple columns, they all end up with the same data somehow. What is the best way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Feb 2014 18:38:55 GMT</pubDate>
    <dc:creator>david_t_pitchfo</dc:creator>
    <dc:date>2014-02-13T18:38:55Z</dc:date>
    <item>
      <title>Creating a running total of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8092#M8086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am wondering how to create a column in a JMP table that is the running total of another column (which I may need to reference via the column name as a string). That is, if I have a column with the following data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&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;5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would want to create a column with a formula whose contents would work out to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;6&lt;/P&gt;&lt;P&gt;10&lt;/P&gt;&lt;P&gt;15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I have this loop, working from a list of names of columns to take the running total of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;For(i = 2, i &amp;lt;= numCols, i++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; colName = colNames&lt;I&gt;;&lt;/I&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; col = New Column("Cumulative " || colName,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; Formula(Summation(j = 1, Row(), As Column(ColName)&lt;J&gt;))&lt;/J&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This appears to work, but is very slow and if I create multiple columns, they all end up with the same data somehow. What is the best way to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 18:38:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8092#M8086</guid>
      <dc:creator>david_t_pitchfo</dc:creator>
      <dc:date>2014-02-13T18:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a running total of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8093#M8087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Formula() does not evaluate its argument, so all column formulas will contain the variables ColName and J and update as the loop proceeds.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is one way to get around this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; i &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; i &lt;SPAN style="color: #011993;"&gt;&amp;lt;=&lt;/SPAN&gt; numCols&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #011993;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier;"&gt;&amp;nbsp; colName &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; colNames&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier;"&gt;&amp;nbsp; col &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #942193;"&gt;"Cumulative "&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;||&lt;/SPAN&gt; colName&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; Numeric &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Eval&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Parse&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Eval Insert&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;"col&amp;lt;&amp;lt; Set Formula(Summation(j = 1, row(), ^(ColName)^&lt;J&gt;))"&lt;/J&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 17px; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 19:13:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8093#M8087</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-02-13T19:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a running total of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8094#M8088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I feel like if there is a way to get JSL to do what you want by parsing a string, then there should be away to do it without using the Parse function, with plain JSL code (which, after all, is just a string). This is what I got to work using Substitute:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;For(i = 2, i &amp;lt;= numCols, i++,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; colName = colNames&lt;I&gt;;&lt;/I&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newName = "Cumulative " || colName;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;col = New Column(newName, Numeric, Continuous,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;Formula(Eval(Substitute(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expr(Summation(j = 1, Row(), As Column(xxx)&lt;J&gt;)),&lt;/J&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Expr(xxx), colName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Courier New, Courier, monospace;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 15:40:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8094#M8088</guid>
      <dc:creator>david_t_pitchfo</dc:creator>
      <dc:date>2014-02-14T15:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a running total of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8095#M8089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that should work as long as the columns never are renamed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This code illustrates the difference between the two approaches. The ugly string method hard codes the formula to a specific column. The second method looks for a column with a specific name (which could be useful)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;// Example table&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2800e1;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;New Table&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #801392;"&gt;"Test"&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; Add Rows&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #801392;"&gt;"Col1"&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Numeric&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Set Values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;4&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;// Add formula by parsed string&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2800e1;"&gt;colNames &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; dt &lt;SPAN style="color: #160091;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #160091;"&gt;&lt;STRONG&gt;get column names&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; string &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;numCols &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; colNames &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2800e1;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; i &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; i &lt;SPAN style="color: #160091;"&gt;&amp;lt;=&lt;/SPAN&gt; numCols&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #160091;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; colName &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; colNames&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; col &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #801392;"&gt;"Cumulative "&lt;/SPAN&gt; &lt;SPAN style="color: #160091;"&gt;||&lt;/SPAN&gt; colName&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Numeric &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2800e1;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Eval&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2800e1;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Parse&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2800e1;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Eval Insert&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #801392;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;"col&amp;lt;&amp;lt; Set Formula(Summation(j = 1, row(), ^(ColName)^&lt;J&gt;))"&lt;/J&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;// Add formula by substituting expression&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2800e1;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; i &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; i &lt;SPAN style="color: #160091;"&gt;&amp;lt;=&lt;/SPAN&gt; numCols&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #160091;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; colName &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; colNames&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; newName &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #801392;"&gt;"Cumulative "&lt;/SPAN&gt; &lt;SPAN style="color: #160091;"&gt;||&lt;/SPAN&gt; colName&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; col &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; newName&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; Numeric&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; Continuous&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; Formula&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;Eval&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2800e1;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp; &lt;/SPAN&gt;Substitute&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;Expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;Summation&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; j &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Row&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;As Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; xxx &lt;STRONG&gt;)[&lt;/STRONG&gt;j&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;Expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; xxx &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; colName&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2800e1;"&gt;Wait&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;// Change column name and a value and look how formulas work&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #160091;"&gt;&lt;SPAN style="color: #2800e1;"&gt;Column&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;set name&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #801392;"&gt;"New Name"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2800e1;"&gt;Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)[&lt;/STRONG&gt;&lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;100&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2800e1;"&gt;Wait&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;// Add new column with same name as the original column.&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;dt &lt;SPAN style="color: #160091;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #160091;"&gt;&lt;STRONG&gt;New Column&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #801392;"&gt;"Col1"&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; numeric&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; values&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;[&lt;/STRONG&gt;&lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #160091;"&gt;&lt;SPAN style="color: #000000;"&gt;dt &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;rerun formulas&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 16:30:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8095#M8089</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-02-14T16:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a running total of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8096#M8090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Btw, if the list of colNames contain names instead of strings, this approach seems to give the same result as the parsed-string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #4c910b;"&gt;&lt;SPAN style="color: #000000;"&gt;colNames &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; dt &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;&lt;STRONG&gt;get column names&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&amp;nbsp; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;// Without the "string" option!&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;numCols &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;N Items&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; colNames &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #160091;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;SPAN style="color: #2800e1;"&gt;For&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;i &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; i &lt;SPAN style="color: #160091;"&gt;&amp;lt;=&lt;/SPAN&gt; numCols&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; i&lt;SPAN style="color: #160091;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; colName &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; colNames&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newName &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #801392;"&gt;"Cumulative "&lt;/SPAN&gt; &lt;SPAN style="color: #160091;"&gt;||&lt;/SPAN&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;colName&lt;SPAN style="color: #160091;"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;get name&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt; col &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;newName&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Numeric&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; Continuous&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2800e1;"&gt;&lt;SPAN style="color: #000000;"&gt; Formula&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;Eval&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;Substitute&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;Expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #2800e1;"&gt;Summation&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;j &lt;SPAN style="color: #160091;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #509092;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #2800e1;"&gt;Row&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; xxx&lt;STRONG&gt;[&lt;/STRONG&gt;j&lt;STRONG&gt;]))&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #2800e1;"&gt;Expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;xxx&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;,&lt;/SPAN&gt; colNames&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #160091;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 16:36:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-running-total-of-a-column/m-p/8096#M8090</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2014-02-14T16:36:55Z</dc:date>
    </item>
  </channel>
</rss>

