<?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: How to add a row with count of rows matching a certain criteria in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-add-a-row-with-count-of-rows-matching-a-certain-criteria/m-p/655239#M84434</link>
    <description>&lt;P&gt;While it is a simple task to add your suggested summary row to the data table, typically, it is not a good idea to mix summary data in with raw data in JMP.&amp;nbsp; A JMP data table is not a Spreadsheet.&amp;nbsp; The preferred form would be to create a separate data table with the statistical summaries, and to leave the raw data in the original format, to allow for easy processing with other JMP platforms.&amp;nbsp; JMP platforms assume that all rows in a data table are of the same summary level.&amp;nbsp; .&lt;/P&gt;
&lt;P&gt;Here is the JSL that would do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

dt &amp;lt;&amp;lt; Add Rows( 1 );
:Platform[N Rows( dt )] = "Bucket";
:Week 1[N Rows( dt )] = Col Number( If( :Week 1 &amp;gt; 95, :Week 1, . ) );
:Week 2[N Rows( dt )] = Col Number( If( :Week 2 &amp;gt; 95, :Week 2, . ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Most of the time, the structure of your data table would be different, making it easier to analyze in JMP.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1688526892169.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54372iFEEEC70B449A4C13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1688526892169.png" alt="txnelson_0-1688526892169.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jul 2023 03:15:39 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-07-05T03:15:39Z</dc:date>
    <item>
      <title>How to add a row with count of rows matching a certain criteria</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-a-row-with-count-of-rows-matching-a-certain-criteria/m-p/655210#M84431</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to add a row in the end of a data table with a fixed text in first column "Bucket" and in subsequent columns count the number of rows that have value more than 95 in that column. is this doable with a jsl script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="newbie_4_0-1688516986955.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54371iAD31D5C4AFD4A46F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="newbie_4_0-1688516986955.png" alt="newbie_4_0-1688516986955.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 00:33:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-a-row-with-count-of-rows-matching-a-certain-criteria/m-p/655210#M84431</guid>
      <dc:creator>newbie_4</dc:creator>
      <dc:date>2023-07-05T00:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a row with count of rows matching a certain criteria</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-a-row-with-count-of-rows-matching-a-certain-criteria/m-p/655239#M84434</link>
      <description>&lt;P&gt;While it is a simple task to add your suggested summary row to the data table, typically, it is not a good idea to mix summary data in with raw data in JMP.&amp;nbsp; A JMP data table is not a Spreadsheet.&amp;nbsp; The preferred form would be to create a separate data table with the statistical summaries, and to leave the raw data in the original format, to allow for easy processing with other JMP platforms.&amp;nbsp; JMP platforms assume that all rows in a data table are of the same summary level.&amp;nbsp; .&lt;/P&gt;
&lt;P&gt;Here is the JSL that would do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

dt &amp;lt;&amp;lt; Add Rows( 1 );
:Platform[N Rows( dt )] = "Bucket";
:Week 1[N Rows( dt )] = Col Number( If( :Week 1 &amp;gt; 95, :Week 1, . ) );
:Week 2[N Rows( dt )] = Col Number( If( :Week 2 &amp;gt; 95, :Week 2, . ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Most of the time, the structure of your data table would be different, making it easier to analyze in JMP.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1688526892169.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54372iFEEEC70B449A4C13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1688526892169.png" alt="txnelson_0-1688526892169.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2023 03:15:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-a-row-with-count-of-rows-matching-a-certain-criteria/m-p/655239#M84434</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-07-05T03:15:39Z</dc:date>
    </item>
  </channel>
</rss>

