<?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 Formula Editor in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544610#M76333</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write a formula that will check if the values in Column A &amp;amp; Column B are both over zero OR if the values in Column C &amp;amp; Column D are both over zero (and so on with many column pairs). &amp;nbsp;If at least one pair has both values over zero, I would like the formula to return 1. &amp;nbsp;If not, return 0. &amp;nbsp;However, the formula I wrote is returning all 1's... even in rows that have all negative numbers. &amp;nbsp;Can someone please tell me what I'm doing wrong? &amp;nbsp;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 15:58:33 GMT</pubDate>
    <dc:creator>EH1</dc:creator>
    <dc:date>2023-06-09T15:58:33Z</dc:date>
    <item>
      <title>Formula Editor</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544610#M76333</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write a formula that will check if the values in Column A &amp;amp; Column B are both over zero OR if the values in Column C &amp;amp; Column D are both over zero (and so on with many column pairs). &amp;nbsp;If at least one pair has both values over zero, I would like the formula to return 1. &amp;nbsp;If not, return 0. &amp;nbsp;However, the formula I wrote is returning all 1's... even in rows that have all negative numbers. &amp;nbsp;Can someone please tell me what I'm doing wrong? &amp;nbsp;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:58:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544610#M76333</guid>
      <dc:creator>EH1</dc:creator>
      <dc:date>2023-06-09T15:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Editor</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544619#M76334</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Sum( :a&amp;gt;0 &amp;amp; :b&amp;gt;0, :c&amp;gt;0 &amp;amp; :d&amp;gt;0, :e&amp;gt;0 &amp;amp; :e&amp;gt;0);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Sep 2022 19:53:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544619#M76334</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-09-14T19:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Editor</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544666#M76336</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the suggestion, but this seems to be summing the numbers. &amp;nbsp;I want to end up with an indicator column (zeros and ones). &amp;nbsp;If "1", that would mean at least one column pair had both numbers over zero.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 20:38:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544666#M76336</guid>
      <dc:creator>EH1</dc:creator>
      <dc:date>2022-09-14T20:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Editor</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544674#M76337</link>
      <description>&lt;P&gt;This is the formula that I have that returns all 1's:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(:A &amp;amp; :B) &amp;gt;= &lt;SPAN&gt;0 &lt;/SPAN&gt;| (:C &amp;amp; :D) &amp;gt;= &lt;SPAN&gt;0 &lt;/SPAN&gt;| (:E &amp;amp; :F) &amp;gt;= &lt;SPAN&gt;0&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 20:43:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544674#M76337</guid>
      <dc:creator>EH1</dc:creator>
      <dc:date>2022-09-14T20:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Editor</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544707#M76338</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/16211"&gt;@EH1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please recognize that ":A &amp;amp; :B" will always yield 1, if not at least one value of both is exactly zero. And comparison with "&amp;gt;= 0" consequently also yields 1.&lt;/P&gt;
&lt;P&gt;So you would have to construct your formula another way: see proposal of Jim ":a&amp;gt;0 &amp;amp; :b&amp;gt;0" will work correctly, and sum is working like or, except that you might put an "if &amp;gt; 0" statement around to get only 0 or 1.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In formula editor below you can see the result of selected subexpression as well to better understand.&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="Georg_1-1663189462973.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/45480i9B2E9C356DDCB33B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Georg_1-1663189462973.png" alt="Georg_1-1663189462973.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 21:06:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544707#M76338</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2022-09-14T21:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Editor</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544908#M76347</link>
      <description>&lt;P&gt;The interpretation of the formula I specified is the following.&lt;/P&gt;
&lt;P&gt;:A&amp;gt;0 &amp;amp; :B&amp;gt;0 will return a 1 if true and a 0 if not.&amp;nbsp; Therefore :A=1 &amp;amp; :B=0 returns a 0 while :A=5 &amp;amp; :B=2 returns a 1.&amp;nbsp; Ahd since each of these comparison clauses are in a Sum() function, it will add up all of the zeros and ones.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 03:26:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/544908#M76347</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-09-15T03:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Formula Editor</title>
      <link>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/545402#M76384</link>
      <description>&lt;P&gt;This expression returns the Boolean value that you want in the column. You do not need the If() function unless need conditional action in the same formula. It will return 0 (false) or 1 (true) as desired.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;(:a&amp;gt;0 &amp;amp; :b&amp;gt;0) | (:c&amp;gt;0 &amp;amp; :d&amp;gt;0) | (:e&amp;gt;0 &amp;amp; :e&amp;gt;0)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:35:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Formula-Editor/m-p/545402#M76384</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-09-16T13:35:14Z</dc:date>
    </item>
  </channel>
</rss>

