<?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 Counting the number of columns with specific value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Counting-the-number-of-columns-with-specific-value/m-p/44172#M25436</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a data table with columns (around 60) representing the different question code and rows respresenting individual student id and their corresponding scores obtained for each questions. Each student was given a different set of booklets with different questions. The scores given for each question is either 0 (no credit) or 1(partial credit) or 2(full credit) and missing values for those question which a student did not get in his/her booklet. I would like to get the count of questions for which the score was not a missing value and &amp;gt; 0 (ie.,1 and 2) in a new column. &amp;nbsp;Below is my sample data table.&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;CNTSCHID&lt;/TD&gt;&lt;TD&gt;CNTSTUID&lt;/TD&gt;&lt;TD&gt;GENDER&lt;/TD&gt;&lt;TD&gt;L6 - M00GQ01S&lt;/TD&gt;&lt;TD&gt;L2 - M033Q01S&lt;/TD&gt;&lt;TD&gt;L4 - M034Q01S&lt;/TD&gt;&lt;TD&gt;L3 - M155Q02C&lt;/TD&gt;&lt;TD&gt;L5 - M155Q03C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70205783&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70205411&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70205421&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70201886&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70206437&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 10 Sep 2017 08:14:36 GMT</pubDate>
    <dc:creator>Rini_Kar</dc:creator>
    <dc:date>2017-09-10T08:14:36Z</dc:date>
    <item>
      <title>Counting the number of columns with specific value</title>
      <link>https://community.jmp.com/t5/Discussions/Counting-the-number-of-columns-with-specific-value/m-p/44172#M25436</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a data table with columns (around 60) representing the different question code and rows respresenting individual student id and their corresponding scores obtained for each questions. Each student was given a different set of booklets with different questions. The scores given for each question is either 0 (no credit) or 1(partial credit) or 2(full credit) and missing values for those question which a student did not get in his/her booklet. I would like to get the count of questions for which the score was not a missing value and &amp;gt; 0 (ie.,1 and 2) in a new column. &amp;nbsp;Below is my sample data table.&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;CNTSCHID&lt;/TD&gt;&lt;TD&gt;CNTSTUID&lt;/TD&gt;&lt;TD&gt;GENDER&lt;/TD&gt;&lt;TD&gt;L6 - M00GQ01S&lt;/TD&gt;&lt;TD&gt;L2 - M033Q01S&lt;/TD&gt;&lt;TD&gt;L4 - M034Q01S&lt;/TD&gt;&lt;TD&gt;L3 - M155Q02C&lt;/TD&gt;&lt;TD&gt;L5 - M155Q03C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70205783&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70205411&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70205421&lt;/TD&gt;&lt;TD&gt;Male&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70201886&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;70200001&lt;/TD&gt;&lt;TD&gt;70206437&lt;/TD&gt;&lt;TD&gt;Female&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 08:14:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Counting-the-number-of-columns-with-specific-value/m-p/44172#M25436</guid>
      <dc:creator>Rini_Kar</dc:creator>
      <dc:date>2017-09-10T08:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of columns with specific value</title>
      <link>https://community.jmp.com/t5/Discussions/Counting-the-number-of-columns-with-specific-value/m-p/44173#M25437</link>
      <description>&lt;P&gt;To do this interactively I would do the following:&lt;/P&gt;
&lt;P&gt;1. &amp;nbsp;Go to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Tables==&amp;gt;Stack&lt;/P&gt;
&lt;P&gt;2. Select all of the response columns as columns to be stacked.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. Click on OK&lt;/P&gt;
&lt;P&gt;4. In the newly created data table, go to the column named "Data" and find a cell with a "0" value.&lt;/P&gt;
&lt;P&gt;5. Click on that cell to select it.&lt;/P&gt;
&lt;P&gt;6. You indicated that you did not want to have any zero values counted, so now right click on the selected cell, and select "Select Matching Cells".&lt;/P&gt;
&lt;P&gt;7. Go to the pull down menu "Rows", click on it and select "Delete Rows"&lt;/P&gt;
&lt;P&gt;( You could repeat the same steps for the rows that have missing values, but since missing values are egnored by JMP platforms, it isn't necessary.)&lt;/P&gt;
&lt;P&gt;8. Now to count the values, go to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Tables==&amp;gt;Summary&lt;/P&gt;
&lt;P&gt;9. Select the column named "Data" for the statistic column, selecting "N" as the statistic to be calculated.&lt;/P&gt;
&lt;P&gt;10. Select the column named "&lt;SPAN&gt;CNTSTUID" and place it in the Group selection box.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;11. Click on "OK"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The new data table will give you a count for each student for the number of questions with responses greater than zero.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 13:12:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Counting-the-number-of-columns-with-specific-value/m-p/44173#M25437</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-09-10T13:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of columns with specific value</title>
      <link>https://community.jmp.com/t5/Discussions/Counting-the-number-of-columns-with-specific-value/m-p/44174#M25438</link>
      <description>&lt;P&gt;Thanks Jim. The solution is working perfectly with my data set&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 13:48:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Counting-the-number-of-columns-with-specific-value/m-p/44174#M25438</guid>
      <dc:creator>Rini_Kar</dc:creator>
      <dc:date>2017-09-10T13:48:05Z</dc:date>
    </item>
  </channel>
</rss>

