<?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: Creating a Cumulative Summary Column for different rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10779#M10403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help but somehow it does not work. I am okay with opening the data table and sorting out by Year and also the column gets created but without any data for 2014 &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Would you help with the formula which goes in the column?&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Sait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2015 16:12:00 GMT</pubDate>
    <dc:creator>saitcopuroglu</dc:creator>
    <dc:date>2015-02-03T16:12:00Z</dc:date>
    <item>
      <title>Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10777#M10401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;As you will understand from the question I am a newbie to JSL scripting/formulating/automating...I have a revenue data set which contains a column called as "year" of 2013 2014 2015... I need a Cumulative Sum for each year but when I create a column of Cumulative Sum (by the help of Graph Builder) it adds all the days and year one to another and ends up with grand 3 year total Cum Sum, where I would like the Cum Sum start over for each year. I could solve it by splitting or subsetting but since every day I need to send a report of revenue comparison it is really annoying. And this data changes every hour so that would be great to update the existing jmp with the added data and then create the Cum Sum Column for each year... Could someone help please. Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Feb 2015 17:05:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10777#M10401</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2015-02-02T17:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10778#M10402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you make sure that your data table is sorted by the grouping variable (year, in your case), then you should be able to use a formula column similar to this one (which uses the Big Class sample data table as an example):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Sort( By( :sex ), Order( Ascending ), Replace Table );&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; New Column( "CumSumBySex",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Continuous,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Numeric,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set Formula( If( :sex != Lag( :sex ), :height, Lag( :CumSumBySex ) + :height ) )&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 14:44:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10778#M10402</guid>
      <dc:creator>michael_jmp</dc:creator>
      <dc:date>2015-02-03T14:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10779#M10403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help but somehow it does not work. I am okay with opening the data table and sorting out by Year and also the column gets created but without any data for 2014 &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Would you help with the formula which goes in the column?&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Sait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 16:12:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10779#M10403</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2015-02-03T16:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10780#M10404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Sait,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you seeing missing values for the rows corresponding to year=2014? Do the rows for other years have values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be able to send a sample of your data? That might help identify the problem more easily.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 16:46:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10780#M10404</guid>
      <dc:creator>michael_jmp</dc:creator>
      <dc:date>2015-02-03T16:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10781#M10405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Michael,&lt;/P&gt;&lt;P&gt;Here is a proportion of the data. I checked the missing values, Column Year is zero.&lt;/P&gt;&lt;P&gt;As I substetted the main data table now the columns are all with values but this time 2014 is illogical an 2015 with true values &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.jmp.com/7.0.1.0/images/emoticons/sad.png"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 17:33:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10781#M10405</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2015-02-03T17:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10782#M10406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Sait,&lt;/P&gt;&lt;P&gt;The difference is that my first example used a character variable for the grouping variable. Your example uses a numeric variable, which is fine. But it requires a little more handling in the formula. The reason for that is that for numeric values, the Lag() on the first row returns missing and comparing missing to the current row also returns missing. Then, in the 2nd row, a missing value from the first row is being added to the value in the 2nd row, which results in a missing value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an updated formula that I think should work for the numeric grouping variable case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If( Row() == 1 | Lag( :Year ) != :Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; :NetRoomRevenueWithOutVat,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Lag( :CumSumByYear ) + :NetRoomRevenueWithOutVat&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if that works for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:21:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10782#M10406</guid>
      <dc:creator>michael_jmp</dc:creator>
      <dc:date>2015-02-03T18:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10783#M10407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Michael, now both years work but whenever the formula faces a 0.00 value (there are days when there is no revenue) the CumBySumYear starts calculating from zero &lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.jmp.com/7.0.1.0/images/emoticons/sad.png"&gt;&lt;/SPAN&gt; which ends irrational results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:36:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10783#M10407</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2015-02-03T18:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10784#M10408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's strange. When I try putting a 0.00 value in :NetRoomRevenueWIthOutVat, the :CumSumByYear value is the same as the previous row's value:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8006_Capture.PNG" style="width: 261px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1175i673A64BD4745701C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8006_Capture.PNG" alt="8006_Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 22:27:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10784#M10408</guid>
      <dc:creator>michael_jmp</dc:creator>
      <dc:date>2016-10-18T22:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10785#M10409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8007_Screen Shot 2015-02-03 at 20.45.27.png" style="width: 227px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1176i5C87D2519CB1172A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8007_Screen Shot 2015-02-03 at 20.45.27.png" alt="8007_Screen Shot 2015-02-03 at 20.45.27.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 22:28:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10785#M10409</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2016-10-18T22:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10786#M10410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Sait,&lt;/P&gt;&lt;P&gt;Could you send the formula you are using for the CumSumByYear column?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:50:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10786#M10410</guid>
      <dc:creator>michael_jmp</dc:creator>
      <dc:date>2015-02-03T18:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10787#M10411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If(Row() == 1 | Lag(:Year) != :Year, :NetRoomRevenueWithOutVat, Lag(:CumSumByYear) + :NetRoomRevenueWithOutVat)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:51:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10787#M10411</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2015-02-03T18:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10788#M10412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only thing I can think to check is the value for :Year in the first row with a value of 0.00. If it is missing or different from the previous, then the results would make sense. Otherwise, I'm not able to reproduce it, at least with the data you sent in earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 18:59:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10788#M10412</guid>
      <dc:creator>michael_jmp</dc:creator>
      <dc:date>2015-02-03T18:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10789#M10413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May I send the whole data? I really would appreciate if you manage which saves me a lot of time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 19:00:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10789#M10413</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2015-02-03T19:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10790#M10414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Michael!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 21:14:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10790#M10414</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2015-02-03T21:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a Cumulative Summary Column for different rows</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10791#M10415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In JMP 11 there is a Transform menu in most platforms that has a Cumulative Sum item. It creates a column with a formula of the form:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px; font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;If( OrMZ( Row() == 1, :sex != Lag( :sex ) ),&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt; 0, &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'courier new', courier;"&gt;Lag() &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px; font-size: 13.3333330154419px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;+ If( Is Missing( :height ), &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;0, &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;:height &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It also relies on the grouping variables being sorted, but it ignores missing values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Feb 2015 16:09:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-a-Cumulative-Summary-Column-for-different-rows/m-p/10791#M10415</guid>
      <dc:creator>XanGregg</dc:creator>
      <dc:date>2015-02-04T16:09:48Z</dc:date>
    </item>
  </channel>
</rss>

