<?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: Col (Sum) function by selecting specific rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/66771#M34492</link>
    <description>&lt;P&gt;When I use&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Sum( :ColumnName, Selected() )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Row number not set or in range in access or evaluation of 'Selected' , Selected/*###*/()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Could somebody tell me what might be happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Aug 2018 21:05:51 GMT</pubDate>
    <dc:creator>twillkickers</dc:creator>
    <dc:date>2018-08-06T21:05:51Z</dc:date>
    <item>
      <title>Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10851#M10468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;Hello,&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;I would like to create a column which calculates another columns mean or sum but I would like to specify the function by :&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;Let’s say if we select the year the calculation to be occured by "Year" or, &lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;Let’s say col (sum) of NetRevenueWithoutVat by Year or "NetRevenueWithoutVat" by "Month (Stay Date)" or&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;Col (Sum) functions of specific row numbers...&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;Would anyone please share his/her knowledge &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;how to do it in scripting or by entering the Col(Sum) function as a formula in a column? &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The logic behind it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;Many thanks in adance&lt;/P&gt;&lt;P style="color: #000000; font-family: Helvetica;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="8029_Screen Shot 2015-02-07 at 10.40.11.png" style="width: 486px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1214i81F9AE4A1DEB75AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="8029_Screen Shot 2015-02-07 at 10.40.11.png" alt="8029_Screen Shot 2015-02-07 at 10.40.11.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 22:32:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10851#M10468</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2016-10-18T22:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10852#M10469</link>
      <description>&lt;P&gt;The answer may depend on what happens next. You can certainly do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-size: 12px; font-family: Courier; color: #032ce4;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);
// (1) Get some data
dt1 = Open("$SAMPLE_DATA/Big Class.jmp");
// (2) Get summary info into a list and a vector
Summarize(groups = By(:sex), groupMeans = Mean(:height));
// (3) Make a table using the summary info
dt2 = NewTable("Height by Gender",
  NewColumn("Gender", Character, Nominal, Values(groups)),
  NewColumn("Mean Height", Numeric, Continuos, Values(groupMeans))
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P style="font-size: 12px; font-family: Courier;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-size: 12px; font-family: Courier;"&gt;&lt;SPAN style="color: #011993;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;(see the JSL Scripting Guide for more options with Summarise).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need step 3, you may be better using either 'Tables &amp;gt; Summary' or 'Analyse &amp;gt; Tabulate'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also aggregate across any set of rows, so long as you can express what that selection is.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 18:16:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10852#M10469</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2018-06-13T18:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10853#M10470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use ColSum() in column formulas. The formula &lt;SPAN style="color: #032ce4;"&gt;Col Sum&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;:&lt;/SPAN&gt;NetRevenueWithoutVat&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;:&lt;/SPAN&gt;Year &lt;STRONG&gt;)&lt;/STRONG&gt; will return the sum (not the cumulative sum) grouped by &lt;EM&gt;Year&lt;/EM&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this formula for a ColSum() that changes dynamically with row selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #032ce4;"&gt;Col Sum&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;:&lt;/SPAN&gt;NetRevenueWithoutVat&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Selected&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 18:46:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10853#M10470</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2015-02-09T18:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10854#M10471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;This is what I was looking for.&lt;/P&gt;&lt;P&gt;Does that mean I could go further and let's say &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #032ce4;"&gt;Col Sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #011993;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;NetRevenueWithoutVat&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #011993;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Year, :Agency &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;STRONG&gt;)&amp;nbsp; ?&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 22:33:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10854#M10471</guid>
      <dc:creator>saitcopuroglu</dc:creator>
      <dc:date>2015-02-09T22:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10855#M10472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, more than one grouping variable is supported. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 22:36:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/10855#M10472</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2015-02-09T22:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44020#M25395</link>
      <description>&lt;P&gt;&lt;BR /&gt;Does this solution only work in specific versions of JMP ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because I am using JMP 12 and I keep running into this error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; select Where(:age ==12); 
n = Col Sum(:age,Selected()); 

&lt;/PRE&gt;&lt;P&gt;Here is my Log&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );&lt;BR /&gt;dt &amp;lt;&amp;lt; select Where( :age == 12 );&lt;BR /&gt;n = Col Sum( :age, Selected/*###*/() );&lt;BR /&gt;Row number not set or in range in access or evaluation of 'Selected' , Selected/*###*/()&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 16:51:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44020#M25395</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2017-09-07T16:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44168#M25433</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp; /&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/182"&gt;@ms&lt;/a&gt;&amp;nbsp;/ &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp; - Any thoughts ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 17:48:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44168#M25433</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2017-09-09T17:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44169#M25434</link>
      <description>&lt;P&gt;What you want to do is to use the ability to reference values in a data table as a vector of data, and pass to it the matrix of the selected rows&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; select Where(:age == 12); 
n = Sum(:age[dt &amp;lt;&amp;lt; Get Selected rows]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 09 Sep 2017 18:40:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44169#M25434</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-09-09T18:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44170#M25435</link>
      <description>&lt;P&gt;The Col Stat() functions are&amp;nbsp;mainly useful in column formulas, and with&amp;nbsp;optional grouping arguments they&amp;nbsp;do&amp;nbsp;not work at all as stand-alone functions (then use Summarize() instead).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My old post was&amp;nbsp;intended to show how to update a column dynamically just by selecting rows by hand&amp;nbsp;(or by script). More of a neat&amp;nbsp;trick than anything very useful...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; New Column("Conditional sum", Formula(Col Sum(:age, Selected())));
dt &amp;lt;&amp;lt; select Where(:age == 12);
// Or select rows by hand and see how numbers change dynamically
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2017 21:01:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44170#M25435</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2017-09-09T21:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44211#M25441</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;:&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thank you . While I am familiar with this approach - what surprised me was the way&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/182"&gt;@ms&lt;/a&gt;&amp;nbsp;was solving the same problem .&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; New Column("Conditional sum", Formula(Col Sum(:age, Selected())));&amp;nbsp; // This Works 
dt &amp;lt;&amp;lt; select Where(:age == 12);
n = Col Sum(:age,Selected());  // This yields an error &lt;/PRE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;While I understand that line 4 can be easily replaced with your solution i.e. and that is my goto solution,&lt;/P&gt;&lt;PRE&gt;n = Sum(:age[dt &amp;lt;&amp;lt; Get Selected Rows]);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I dont understand why this line of code is resulting in an error in my case .&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;n = Col Sum(:age,Selected()); &lt;/PRE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; The documentation doesn't show that this&amp;nbsp;feature exists ( atleast in JPM 12) &amp;nbsp;- so was really excited by this new trick but it seemed to work in the case&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/182"&gt;@ms&lt;/a&gt;&amp;nbsp;Solved the question earlier. Can either of you explain why the exact same code works in a column formula but throws an error outside ?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Uday&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 16:27:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44211#M25441</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2017-09-11T16:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44215#M25444</link>
      <description>&lt;P&gt;Your example code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt &amp;lt;&amp;lt; select Where(:age ==12); 
n = Col Sum(:age,Selected()); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The Col Sum() function operates differently in open code vs. in a formula. &amp;nbsp;When processing, the data, in open code, if the second element is present, JMP cannot execute the statement since the resulting value is going to return more than one value. &amp;nbsp;That is, the returned value in your example would require the variable "n" to have 2 values. &amp;nbsp;The Col Sum() for selected rows and the Col Sum() for non selected rows. &amp;nbsp;I suppose, that JMP could return a list of values, but as&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/182"&gt;@ms&lt;/a&gt;&amp;nbsp;indicated the Summarize() function is used for this. &amp;nbsp;Therefore, the reason the second element in the Col Sum() function is not valid in open code.&lt;/P&gt;
&lt;LI-SPOILER&gt;&amp;nbsp;&lt;/LI-SPOILER&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:12:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/44215#M25444</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-09-11T17:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/66771#M34492</link>
      <description>&lt;P&gt;When I use&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Sum( :ColumnName, Selected() )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Row number not set or in range in access or evaluation of 'Selected' , Selected/*###*/()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Could somebody tell me what might be happening?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 21:05:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/66771#M34492</guid>
      <dc:creator>twillkickers</dc:creator>
      <dc:date>2018-08-06T21:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71798#M35498</link>
      <description>&lt;P&gt;Are you able to use this formula and define the logic for a particular column? For example, I am trying to sum the dollar amounts for each record between two dates. So the formula would look like this:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas" size="2"&gt;Col Sum&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;( :Dollar&amp;nbsp;Amount, :Date)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;But I am not sure how to define the date range.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 21:06:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71798#M35498</guid>
      <dc:creator>Mitch103</dc:creator>
      <dc:date>2018-09-07T21:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71799#M35499</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12723"&gt;@Mitch103&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try something like this as suggested by&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/182"&gt;@ms&lt;/a&gt;:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table(); 

dt &amp;lt;&amp;lt; Select Where(:Date &amp;gt; StartDate &amp;amp; :Date &amp;lt;EndDate); 

dt &amp;lt;&amp;lt; New Column("ConditionalSum",Numeric,continuous,Formula(Col Sum(:Date,Selected())); &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Sep 2018 21:13:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71799#M35499</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-09-07T21:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71826#M35500</link>
      <description>&lt;P&gt;&lt;FONT face="andale mono,times"&gt;So forgive me, but I am a new JMP user. I am only using the formula editor, not JSL. I am not sure if what you are giving me is for JSL or the forumula editor. Am I not able to put the conditions into the formula like this?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;&lt;FONT color="#0000dd" size="2"&gt;Col Sum&lt;/FONT&gt;&lt;FONT size="2"&gt;(:&lt;FONT size="2"&gt;Settlement Amount&lt;/FONT&gt;,&lt;FONT size="2"&gt;:Date &amp;gt;= &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;8&lt;/FONT&gt;&lt;FONT size="2"&gt;/&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;1&lt;/FONT&gt;&lt;FONT size="2"&gt;/&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;2018&lt;/FONT&gt;&lt;FONT size="2"&gt; &amp;amp; :Date &amp;lt;= &lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;8&lt;/FONT&gt;&lt;FONT size="2"&gt;/&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;7&lt;/FONT&gt;&lt;FONT size="2"&gt;/&lt;/FONT&gt;&lt;FONT color="#008080" size="2"&gt;2018&lt;/FONT&gt;&lt;FONT size="2"&gt;,:Card Number&lt;/FONT&gt;&lt;/FONT&gt;)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;Except the problem I am running into is that JMP is autocorrecting it to be division, not a date formula.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="andale mono,times"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Sep 2018 21:26:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71826#M35500</guid>
      <dc:creator>Mitch103</dc:creator>
      <dc:date>2018-09-07T21:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71827#M35501</link>
      <description>Nevermind, got it!&lt;BR /&gt;&lt;BR /&gt;Col Sum(&lt;BR /&gt;:Settlement Amount,&lt;BR /&gt;:Date &amp;gt;= 01Aug2018 &amp;amp; :Date &amp;lt;= 07Aug2018,&lt;BR /&gt;:Card Number&lt;BR /&gt;)</description>
      <pubDate>Fri, 07 Sep 2018 21:31:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71827#M35501</guid>
      <dc:creator>Mitch103</dc:creator>
      <dc:date>2018-09-07T21:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Col (Sum) function by selecting specific rows</title>
      <link>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71829#M35503</link>
      <description>&lt;P&gt;You would have to create a separate column that contains a grouping column for each date range you want to use, or you might want to use something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Sum(
	If(
		:Event Date &amp;gt;= Informat( "02/01/2001", "mm/dd/yyyy" ) &amp;amp; :Event Date &amp;lt;=
		Informat( "02/28/2001", "mm/dd/yyyy" ),
		:Total Fatal Injuries,
		0
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Sep 2018 22:10:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Col-Sum-function-by-selecting-specific-rows/m-p/71829#M35503</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-09-07T22:10:24Z</dc:date>
    </item>
  </channel>
</rss>

