<?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: Issue with creating a rolling cumulative sum as a function of time in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402708#M65352</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it work to do the following?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Sort the table by x and time variables&lt;/P&gt;
&lt;P&gt;2) Add the cumulative sum formula as jthi shows&lt;/P&gt;
&lt;P&gt;3) Delete (or suppress the evaluation of) the formula from the new column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At this point, the cumulative sum column will not change based on table sorting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Brady&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jul 2021 20:52:44 GMT</pubDate>
    <dc:creator>brady_brady</dc:creator>
    <dc:date>2021-07-20T20:52:44Z</dc:date>
    <item>
      <title>Issue with creating a rolling cumulative sum as a function of time</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402579#M65336</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a simple example where we do a kinetic ( in column "time (min)") for a bunch of samples ( in column "variable x"). I need to create a new column that run a cumulative sum that accounts for the time elapsed for each one of the samples listed in "variable x". I tried the col cumulative sum function but it does not do accomplish the goal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect a good approach would be with row, lag, or offset but I have no clue how to put that together. I've attached an&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

New Table( "noci",
	Add Rows( 8 ),
	New Column( "variable X",
		Character,
		"Nominal",
		Set Values( {"a", "a", "a", "a", "b", "b", "b", "b"} )
	),
	New Column( "Time (min)",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1, 2, 3, 4, 1, 2, 3, 4] )
	),
	New Column( "Nociception Data",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1, 2, 1, 2, 3, 1, 2, 1] )
	),
	New Column( "Cumulative nociception as function of ellapse time",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1, 3, 4, 6, 3, 4, 6, 7] )
	)
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;example data table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any input to put me on the right track would be very appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sebastien&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:34:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402579#M65336</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2023-06-10T23:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with creating a rolling cumulative sum as a function of time</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402606#M65340</link>
      <description>&lt;P&gt;How come Col Cumulative Sum() doesn't accomplish the goal? If the "Cumulative nociception as function of ellapse time" has the values you want, col cumulative sum seems to work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum(:Nociception Data, :variable X)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1626803251208.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/34390iB53730B5C319A2BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1626803251208.png" alt="jthi_0-1626803251208.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I might have also missed or understood something incorrectly and you want something different, if that is the case, could you provide a column with correct results?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 17:54:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402606#M65340</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-07-20T17:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with creating a rolling cumulative sum as a function of time</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402703#M65349</link>
      <description>Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;You are correct but the problem I have is that if the table gets reordered (say by reordering on the basis of the nociception data column), using the cumulative column will not use the time (min) column to calculate the cumulative sum.&lt;BR /&gt;&lt;BR /&gt;Hopefully, I'm being clear.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;&lt;BR /&gt;Sebastien</description>
      <pubDate>Tue, 20 Jul 2021 20:01:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402703#M65349</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2021-07-20T20:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with creating a rolling cumulative sum as a function of time</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402708#M65352</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would it work to do the following?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Sort the table by x and time variables&lt;/P&gt;
&lt;P&gt;2) Add the cumulative sum formula as jthi shows&lt;/P&gt;
&lt;P&gt;3) Delete (or suppress the evaluation of) the formula from the new column&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At this point, the cumulative sum column will not change based on table sorting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Brady&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 20:52:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402708#M65352</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2021-07-20T20:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with creating a rolling cumulative sum as a function of time</title>
      <link>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402948#M65368</link>
      <description>&lt;P&gt;Hi Brady,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not the most elegant solution but it would work. Still I wish I would have thought of it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sebastien&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 14:46:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Issue-with-creating-a-rolling-cumulative-sum-as-a-function-of/m-p/402948#M65368</guid>
      <dc:creator>Sburel</dc:creator>
      <dc:date>2021-07-21T14:46:45Z</dc:date>
    </item>
  </channel>
</rss>

