<?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 Sum only selected rows of a column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66898#M34521</link>
    <description>&lt;P&gt;Is there an easy way to sum only the selected rows of a column and save the value to a global variable?&lt;/P&gt;</description>
    <pubDate>Tue, 07 Aug 2018 13:36:11 GMT</pubDate>
    <dc:creator>twillkickers</dc:creator>
    <dc:date>2018-08-07T13:36:11Z</dc:date>
    <item>
      <title>Sum only selected rows of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66898#M34521</link>
      <description>&lt;P&gt;Is there an easy way to sum only the selected rows of a column and save the value to a global variable?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 13:36:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66898#M34521</guid>
      <dc:creator>twillkickers</dc:creator>
      <dc:date>2018-08-07T13:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sum only selected rows of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66906#M34524</link>
      <description>&lt;P&gt;Here is a simple script to do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt &amp;lt;&amp;lt; set table variable( "my variable", Col Sum( If( Selected(), :height, . ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Aug 2018 14:30:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66906#M34524</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-08-07T14:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sum only selected rows of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66915#M34525</link>
      <description>&lt;P&gt;How is this type of variable called? I can't call it using ::my variable&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 14:53:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66915#M34525</guid>
      <dc:creator>twillkickers</dc:creator>
      <dc:date>2018-08-07T14:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sum only selected rows of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66934#M34526</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11907"&gt;@twillkickers&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; They are referenced the same way you would reference a column&amp;nbsp;&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; Select Randomly(0.1); 
dt &amp;lt;&amp;lt; set table variable( "myvariable", Col Sum( If( Selected(), :height, . ) ) );

Print(:myvariable);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Aug 2018 15:11:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66934#M34526</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2018-08-07T15:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sum only selected rows of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66940#M34529</link>
      <description>&lt;P&gt;If you want to do this without using a script, first select the rows (using whatever method you want).&amp;nbsp; Then, under Rows-Select-Name selection in column, you create a column of 0 and 1 that identifies the selected rows.&amp;nbsp; Then create a new column using the Column Sum formula and put the newly created Named selection in column as the By variable.&amp;nbsp; The result will show the sum for the selected and unselected rows.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Aug 2018 15:49:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/66940#M34529</guid>
      <dc:creator>dale_lehman</dc:creator>
      <dc:date>2018-08-07T15:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sum only selected rows of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/67359#M34601</link>
      <description>Thank you. This works for me. Is there a function similar to "set table variable" which sets the value as a global variable? (:: instead of :)&lt;/img&gt; I am having to take the table variable and save it as a global variable to do my calculations.</description>
      <pubDate>Thu, 09 Aug 2018 18:16:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/67359#M34601</guid>
      <dc:creator>twillkickers</dc:creator>
      <dc:date>2018-08-09T18:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sum only selected rows of a column</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/67361#M34603</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;::myGlobalVariable = Col Sum( If( Selected(), :height, . ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Aug 2018 18:23:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-only-selected-rows-of-a-column/m-p/67361#M34603</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-08-09T18:23:22Z</dc:date>
    </item>
  </channel>
</rss>

