<?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: JSL to create a column that is a cumulative sum based on previous row of other columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-to-create-a-column-that-is-a-cumulative-sum-based-on/m-p/302100#M55969</link>
    <description>&lt;P&gt;Here is one of the ways to code this.&amp;nbsp; It is a column formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1, x = 0 );
If( :Qty &amp;gt; 500,
	x = :Qty,
	x = x + :Qty
);
x;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 07 Sep 2020 17:37:15 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-09-07T17:37:15Z</dc:date>
    <item>
      <title>JSL to create a column that is a cumulative sum based on previous row of other columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-create-a-column-that-is-a-cumulative-sum-based-on/m-p/302015#M55964</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am using JMP Pro 12.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need help to create a new column ('cum_Qty') in JSL that will be an ongoing sum of the previous rows value in 'Qty'column until meet =&amp;gt; 500. If the row qty is =&amp;gt; 500 in , the value will update as it in the 'cum_Qty'.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In workweek 2, the qty is 633 (&amp;gt; 500) in 'Qty'column, this value is updated as 633 in 'çum_Qty' column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In workweek 3, the qty is 185 (&amp;lt; 500), it sums 185 + 633 = 818, this value is updated in&amp;nbsp;'çum_Qty' column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In workweek 4, the qty is 130 (&amp;lt;500), it sums 130 + 185 + 633 = 948, this value is updated in&amp;nbsp;'çum_Qty' column.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and so on.......Refer attached file for details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:37:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-create-a-column-that-is-a-cumulative-sum-based-on/m-p/302015#M55964</guid>
      <dc:creator>bzanos</dc:creator>
      <dc:date>2023-06-09T23:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to create a column that is a cumulative sum based on previous row of other columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-create-a-column-that-is-a-cumulative-sum-based-on/m-p/302100#M55969</link>
      <description>&lt;P&gt;Here is one of the ways to code this.&amp;nbsp; It is a column formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1, x = 0 );
If( :Qty &amp;gt; 500,
	x = :Qty,
	x = x + :Qty
);
x;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Sep 2020 17:37:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-create-a-column-that-is-a-cumulative-sum-based-on/m-p/302100#M55969</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-07T17:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to create a column that is a cumulative sum based on previous row of other columns</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-create-a-column-that-is-a-cumulative-sum-based-on/m-p/302602#M55976</link>
      <description>Thanks Jim. It works perfectly!&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Sep 2020 09:33:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-create-a-column-that-is-a-cumulative-sum-based-on/m-p/302602#M55976</guid>
      <dc:creator>bzanos</dc:creator>
      <dc:date>2020-09-08T09:33:48Z</dc:date>
    </item>
  </channel>
</rss>

