<?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: If statement Formula not working in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109100#M39606</link>
    <description>&lt;P&gt;Also, if the 1s in the table were calculated, they might not be exactly 1 (which is what you are testing for). The table displays a value that is rounded to &lt;EM&gt;about&lt;/EM&gt; 10 digits. Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt;&lt;SPAN class="token punctuation"&gt;Round(:&lt;/SPAN&gt;Name&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Behavioral - physical aggression to staff"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;), 5) == 1&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and see if that works better.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Feb 2019 21:44:22 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2019-02-06T21:44:22Z</dc:date>
    <item>
      <title>If statement Formula not working</title>
      <link>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109087#M39602</link>
      <description>&lt;P&gt;For the past couple years when I copy and paste the formula below it has not worked consistently.&amp;nbsp; I've tried typing it in the formula box and have at times been succesful but it's not consistent.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was finally upgraded to JMP 14 last week and an option that is awesome is that I can preview a data sample to see what the formula result will look like.&amp;nbsp; However, I can't figure out why this formula won't work.&amp;nbsp; Below is a screenshot of the formula as well as the preview of the dataset and formula result.&lt;/P&gt;&lt;P&gt;Are there any suggestions?&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="2019-02-06 JMP formula not working.png" style="width: 638px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/15430i1228084C86CF71A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-02-06 JMP formula not working.png" alt="2019-02-06 JMP formula not working.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 20:36:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109087#M39602</guid>
      <dc:creator>Datamom1</dc:creator>
      <dc:date>2019-02-06T20:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: If statement Formula not working</title>
      <link>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109089#M39604</link>
      <description>&lt;P&gt;A possible issue may be that JMP may be having an issue with&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Behaviorial - physical aggression to staff&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Is this a calculation of a column or variable called&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Behavioral&lt;/P&gt;
&lt;P&gt;from which is subtracted a column or variable called&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; physical aggression to staff&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;is this a single column or variable called&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Behavioral - physical aggression to staff&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP can get confused over this.&amp;nbsp; If it is one column and not a calculation, you should actually state the formula as&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( :Name("Behavioral - physical aggression to staff") == 1,
     1,
     0
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The JMP formula editor will not display the :Name() function, but by you putting into your formula, it will make sure JMP understands what you are specifying.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 20:49:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109089#M39604</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-02-06T20:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: If statement Formula not working</title>
      <link>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109100#M39606</link>
      <description>&lt;P&gt;Also, if the 1s in the table were calculated, they might not be exactly 1 (which is what you are testing for). The table displays a value that is rounded to &lt;EM&gt;about&lt;/EM&gt; 10 digits. Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-jsl"&gt;&lt;CODE class="  language-jsl"&gt;&lt;SPAN class="token punctuation"&gt;Round(:&lt;/SPAN&gt;Name&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"Behavioral - physical aggression to staff"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;), 5) == 1&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and see if that works better.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 21:44:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109100#M39606</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-02-06T21:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: If statement Formula not working</title>
      <link>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109110#M39607</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6331"&gt;@ErnestPasour&lt;/a&gt;&amp;nbsp;for the awesome comment!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 21:47:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109110#M39607</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-02-06T21:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: If statement Formula not working</title>
      <link>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109112#M39608</link>
      <description>&lt;P&gt;The data looks to be left justified in the preview.&amp;nbsp; Is the data type set to character for the &lt;EM&gt;Behavioral - physical aggression to staff&lt;/EM&gt; column?&amp;nbsp; If so, you will need to add double-quotes around the number on the right side of the == operator or change the data type of the column.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 22:16:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109112#M39608</guid>
      <dc:creator>Wendy_Murphrey</dc:creator>
      <dc:date>2019-02-06T22:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: If statement Formula not working</title>
      <link>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109134#M39615</link>
      <description>&lt;P&gt;Thank you very much!&amp;nbsp; That worked perfectly! This will save me a lot of time.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 14:52:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/If-statement-Formula-not-working/m-p/109134#M39615</guid>
      <dc:creator>Datamom1</dc:creator>
      <dc:date>2019-02-07T14:52:53Z</dc:date>
    </item>
  </channel>
</rss>

