<?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: How to create a new field using if/then from 2 existing fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701473#M1066135</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&amp;nbsp; I tried yours first and it worked perfectly.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Sep 2014 21:15:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-03T21:15:31Z</dc:date>
    <item>
      <title>How to create a new field using if/then from 2 existing fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701468#M1066130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 fields, Field_1 and Field_2.&amp;nbsp; I'm trying to create (hopefully in the script as it would carry through the entire file, but if no,t then in an expression) a third field that says something to the effect of "populate this with Field_1 if there is a value, otherwise populate with Field_2" and name this new one Field_3.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 13:52:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701468#M1066130</guid>
      <dc:creator />
      <dc:date>2014-09-03T13:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field using if/then from 2 existing fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701469#M1066131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barbara,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just try. The scripting_language of QlikView is pretty close to plain English.&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; IF(LEN([Field1])&amp;gt;=1, [Field1], [Field2]) as Field3 &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;Empty fields are somewhat tricky - to find out whether the field is populated or empty, try any of the following&lt;/P&gt;&lt;P&gt;- ISNUM() (if the value that should&amp;nbsp; be there would be numeric)&lt;/P&gt;&lt;P&gt;- ISTEXT() (if the value supposed to be there would be a text string)&lt;/P&gt;&lt;P&gt;- LEN([Field1])&lt;/P&gt;&lt;P&gt;- ISNULL([Field1])&lt;/P&gt;&lt;P&gt;It really depends - on what, I cannot quite say &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; I just always try which one of those formulas works.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 14:00:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701469#M1066131</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-09-03T14:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field using if/then from 2 existing fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701470#M1066132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hy !&lt;/P&gt;&lt;P&gt;try this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field_1,&lt;/P&gt;&lt;P&gt;Field_2,&lt;/P&gt;&lt;P&gt;if(not isnull(Field_1) ,Field_1,Field_2) as Field_3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 14:08:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701470#M1066132</guid>
      <dc:creator>maxime66</dc:creator>
      <dc:date>2014-09-03T14:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field using if/then from 2 existing fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701471#M1066133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;if(len(trim(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;Field_1&lt;/SPAN&gt;))&amp;gt;0, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;Field_1 , &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.7272720336914px;"&gt;Field_2) as Field_3,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12.7272720336914px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;...... &lt;/SPAN&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 16:42:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701471#M1066133</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-09-03T16:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field using if/then from 2 existing fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701472#M1066134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your fields are numeric, try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14097655997653621" jivemacro_uid="_14097655997653621"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Alt(Field_1, Field_2) as Field_3&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;hope this helps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Marco&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 17:32:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701472#M1066134</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-09-03T17:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a new field using if/then from 2 existing fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701473#M1066135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&amp;nbsp; I tried yours first and it worked perfectly.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 21:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-a-new-field-using-if-then-from-2-existing-fields/m-p/701473#M1066135</guid>
      <dc:creator />
      <dc:date>2014-09-03T21:15:31Z</dc:date>
    </item>
  </channel>
</rss>

