<?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 IF statement is returning null for the ELSE part in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/IF-statement-is-returning-null-for-the-ELSE-part/m-p/2006385#M11642</link>
    <description>&lt;P&gt;Dear All,&lt;BR /&gt;&lt;BR /&gt;After joining two table with outer join, I need to create a new column (collumn 3) that copies another one (column1) but replace all the null values in (column1) with values in (column2).&lt;/P&gt;
&lt;P&gt;My code looks something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table1:
Load Name,
     Column1
From
[location1];

Outer Join(table1)
Load Name,
     Subname,
     Column2
From
[location1];

Table3:
Load Column1
     Column2
     If(IsNull(Column2), Column1, Column2) as Column3
Resident Table1;

 &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I get the correct result when Column2 is not null, but when it is null I get null and not Column2.&lt;/P&gt;
&lt;P&gt;Screenshot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nitaci_0-1668771698634.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/94082i9339C4512199A743/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nitaci_0-1668771698634.png" alt="Nitaci_0-1668771698634.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any suggenstions?&lt;/P&gt;</description>
    <pubDate>Fri, 18 Nov 2022 11:47:16 GMT</pubDate>
    <dc:creator>Nitaci</dc:creator>
    <dc:date>2022-11-18T11:47:16Z</dc:date>
    <item>
      <title>IF statement is returning null for the ELSE part</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/IF-statement-is-returning-null-for-the-ELSE-part/m-p/2006385#M11642</link>
      <description>&lt;P&gt;Dear All,&lt;BR /&gt;&lt;BR /&gt;After joining two table with outer join, I need to create a new column (collumn 3) that copies another one (column1) but replace all the null values in (column1) with values in (column2).&lt;/P&gt;
&lt;P&gt;My code looks something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table1:
Load Name,
     Column1
From
[location1];

Outer Join(table1)
Load Name,
     Subname,
     Column2
From
[location1];

Table3:
Load Column1
     Column2
     If(IsNull(Column2), Column1, Column2) as Column3
Resident Table1;

 &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I get the correct result when Column2 is not null, but when it is null I get null and not Column2.&lt;/P&gt;
&lt;P&gt;Screenshot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Nitaci_0-1668771698634.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/94082i9339C4512199A743/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Nitaci_0-1668771698634.png" alt="Nitaci_0-1668771698634.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any suggenstions?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 11:47:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/IF-statement-is-returning-null-for-the-ELSE-part/m-p/2006385#M11642</guid>
      <dc:creator>Nitaci</dc:creator>
      <dc:date>2022-11-18T11:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement is returning null for the ELSE part</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/IF-statement-is-returning-null-for-the-ELSE-part/m-p/2006400#M11643</link>
      <description>&lt;P&gt;Try with this in place of the IsNull()&lt;/P&gt;
&lt;P&gt;Len(Trim(Column2))= 0&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 12:33:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/IF-statement-is-returning-null-for-the-ELSE-part/m-p/2006400#M11643</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-11-18T12:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement is returning null for the ELSE part</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/IF-statement-is-returning-null-for-the-ELSE-part/m-p/2006410#M11644</link>
      <description>&lt;P&gt;Great thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 12:51:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/IF-statement-is-returning-null-for-the-ELSE-part/m-p/2006410#M11644</guid>
      <dc:creator>Nitaci</dc:creator>
      <dc:date>2022-11-18T12:51:41Z</dc:date>
    </item>
  </channel>
</rss>

