<?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: Maintaining &amp;quot;empty spaces&amp;quot; in resulting column after using if formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/399519#M65045</link>
    <description>Thank you very much!! Your reply helped me a lot.</description>
    <pubDate>Thu, 08 Jul 2021 08:12:43 GMT</pubDate>
    <dc:creator>mmkaz</dc:creator>
    <dc:date>2021-07-08T08:12:43Z</dc:date>
    <item>
      <title>Maintaining "empty spaces" in resulting column after using if formula</title>
      <link>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/398578#M64956</link>
      <description>&lt;P&gt;Hey everyone,&lt;BR /&gt;&lt;BR /&gt;I'm pretty new to jmp, so I might seem a little off with what I am asking and probably I won't use the correct terminology, but anyways I m rather despaired because I cannot think of a solution to my problem:&amp;nbsp;&lt;BR /&gt;Let me describe my situation shortly: So I am a student and I am currently working on a set of data. I am looking at adverse drug effects of certain medication and the effect I'm looking at right now is "erectile dysfunction", I got data from baseline and data for 4 weeks, 12 weeks etc. etc., which means I got a column "erectile dysfunction 4wk", "erectile dysfunction baseline" etc.&amp;nbsp;&lt;BR /&gt;I added a new column called "new onset erectile dysfunction 4 wk", which means I am looking at those, who developed the adverse effect after e.g. &amp;nbsp;4 weeks, filtering out those who got them at baseline and still got them after 4 weeks - irrespectively from the given medication. In short: I am trying to focus on the incidence of erectile dysfunction after 4 weeks to approximate a drug induced effect.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I used a formula that looks like that:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each Row(
	:"new on-set erectile dysfunction 4 WK: y/n "n = If( 
		:"erectile dysfunction Base y/n"n == "n" &amp;amp; :"erectile dysfunction 4 WK: y/n"n
		== "y"
	, 
		"y"
	, 
		"n"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;My problem is that by using that formula, jmp replaces my empty values with "n", and I cannot think of any way to modify my formula so that empty spaces remain empty.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2021-07-06 um 16.56.28.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/33982iFBB8B7F79805C3EF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2021-07-06 um 16.56.28.png" alt="Bildschirmfoto 2021-07-06 um 16.56.28.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;First column is "erectile dysfunction baseline", second is "erectile dysfunction 4wk" and third one is "new-onset erectile dysfunction 4wk".&lt;BR /&gt;So I hope anyone can help. Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:33:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/398578#M64956</guid>
      <dc:creator>mmkaz</dc:creator>
      <dc:date>2023-06-10T23:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Maintaining "empty spaces" in resulting column after using if formula</title>
      <link>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/398636#M64957</link>
      <description>&lt;P&gt;Your JSL is setting the the value to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;"n"&lt;/P&gt;
&lt;P&gt;so one option is to set it to&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;""&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each Row(
	:"new on-set erectile dysfunction 4 WK: y/n "n = If( 
		:"erectile dysfunction Base y/n"n == "n" &amp;amp; :"erectile dysfunction 4 WK: y/n"n
		== "y"
	, 
		"y"
	, 
		""
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or after looking at your data, the checking on the value of&amp;nbsp;erectile dysfunction Base y/n being a blank might be what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each Row(
	:"new on-set erectile dysfunction 4 WK: y/n "n = If( 
		(:"erectile dysfunction Base y/n"n == "n" |
			:"erectile dysfunction Base y/n"n == "" ) &amp;amp; 
			:"erectile dysfunction 4 WK: y/n"n
		== "y"
	, 
		"y"
	, 
		"n"
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Jul 2021 15:52:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/398636#M64957</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-07-06T15:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Maintaining "empty spaces" in resulting column after using if formula</title>
      <link>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/398639#M64960</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I think you may have over-engineered your formula:&lt;/P&gt;
&lt;P&gt;First, you do not need to specify For Each Row in a column formula: JMP processes each row separately by default&lt;/P&gt;
&lt;P&gt;Second, if I understand correctly the syntax of your formula, I think it may be simplified as a column formula as shown below.&lt;/P&gt;
&lt;P&gt;Third, because Empty text values are evaluated as NOT "y" and NOT "n", JMP evaluates your formula as "n", so here is a possible solution to your problem.&lt;/P&gt;
&lt;P&gt;(Note: I did not use your specific column headings but you can replace those easily in the formula editor).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If(
	:BASELINE == "n" &amp;amp; :Week 4 == "y", "y",
	Is Missing( :BASELINE ) | Is Missing( :Week 4 ), .,
	"n"
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;TS&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 15:56:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/398639#M64960</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2021-07-06T15:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Maintaining "empty spaces" in resulting column after using if formula</title>
      <link>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/399518#M65044</link>
      <description>Wow that makes a lot of sense! Yea I was actually struggling with finding an efficient way to write the formula, but much thanks to you!!&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jul 2021 08:12:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/399518#M65044</guid>
      <dc:creator>mmkaz</dc:creator>
      <dc:date>2021-07-08T08:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Maintaining "empty spaces" in resulting column after using if formula</title>
      <link>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/399519#M65045</link>
      <description>Thank you very much!! Your reply helped me a lot.</description>
      <pubDate>Thu, 08 Jul 2021 08:12:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Maintaining-quot-empty-spaces-quot-in-resulting-column-after/m-p/399519#M65045</guid>
      <dc:creator>mmkaz</dc:creator>
      <dc:date>2021-07-08T08:12:43Z</dc:date>
    </item>
  </channel>
</rss>

