<?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 variable columns that have non-zero values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Counting-the-number-of-variable-columns-that-have-non-zero/m-p/264826#M51600</link>
    <description>&lt;P&gt;I have a table of formulations.&amp;nbsp; The amount of each of 60 possible ingredients are listed in columns.&amp;nbsp; Most of the formulations contain only 5-10 ingredients with the ingredient amount of all other columns being zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a formulation column (without scripting) to count the number of non-zero ingredients.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way I was thinking to do this is to sum conditional statements for each ingredient.&amp;nbsp; This shows the first 4 ingredients:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kpgallagher_ppg_0-1588779368026.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/23777iD5195228BF87756C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kpgallagher_ppg_0-1588779368026.png" alt="kpgallagher_ppg_0-1588779368026.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a quicker/easier way to do this without having to create a string of 60 if statements?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2020 15:39:49 GMT</pubDate>
    <dc:creator>kpgallagher_ppg</dc:creator>
    <dc:date>2020-05-06T15:39:49Z</dc:date>
    <item>
      <title>Counting the number of variable columns that have non-zero values</title>
      <link>https://community.jmp.com/t5/Discussions/Counting-the-number-of-variable-columns-that-have-non-zero/m-p/264826#M51600</link>
      <description>&lt;P&gt;I have a table of formulations.&amp;nbsp; The amount of each of 60 possible ingredients are listed in columns.&amp;nbsp; Most of the formulations contain only 5-10 ingredients with the ingredient amount of all other columns being zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create a formulation column (without scripting) to count the number of non-zero ingredients.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The way I was thinking to do this is to sum conditional statements for each ingredient.&amp;nbsp; This shows the first 4 ingredients:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kpgallagher_ppg_0-1588779368026.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/23777iD5195228BF87756C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kpgallagher_ppg_0-1588779368026.png" alt="kpgallagher_ppg_0-1588779368026.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a quicker/easier way to do this without having to create a string of 60 if statements?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 15:39:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Counting-the-number-of-variable-columns-that-have-non-zero/m-p/264826#M51600</guid>
      <dc:creator>kpgallagher_ppg</dc:creator>
      <dc:date>2020-05-06T15:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Counting the number of variable columns that have non-zero values</title>
      <link>https://community.jmp.com/t5/Discussions/Counting-the-number-of-variable-columns-that-have-non-zero/m-p/264854#M51603</link>
      <description>&lt;P&gt;You can shorten the code up to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;sum( :T400&amp;gt;0,:T402&amp;gt;0,:T404&amp;gt;0,:T405&amp;gt;0)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 May 2020 16:01:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Counting-the-number-of-variable-columns-that-have-non-zero/m-p/264854#M51603</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-05-06T16:01:05Z</dc:date>
    </item>
  </channel>
</rss>

