<?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 Function not working for one field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-Function-not-working-for-one-field/m-p/1205111#M462015</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, this is a very strange one we've encountered.&amp;nbsp; We have a basic if statement, that for one specific field, for only 3 records (out of about 100k) it fails.&amp;nbsp; So for example;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;If([Product Class] = 'X', [Gender - 1],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If([Product Class] = 'Y', [Gender - 2], 'FALSE'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For every case of Product Class = X, it returns Gender 1 field correctly.&amp;nbsp; For 99% of Y Product Class, it correctly returns Gender 2 field.&amp;nbsp; However, for 3 records with Product Class Y, it returns "FALSE."&amp;nbsp; Where things get very odd, though, is if I change the formula to be any other field besides Gender 2, it returns the correct value for those 3 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it resorts to FALSE, saying the second If Statement is false, specifically ONLY for the Gender - 2 field.&amp;nbsp; Any other field, or if we hard-code it, it comes back as True and provides the correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone think of a reason why this would be happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Nov 2016 13:27:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-11-02T13:27:02Z</dc:date>
    <item>
      <title>If Function not working for one field</title>
      <link>https://community.qlik.com/t5/QlikView/If-Function-not-working-for-one-field/m-p/1205111#M462015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, this is a very strange one we've encountered.&amp;nbsp; We have a basic if statement, that for one specific field, for only 3 records (out of about 100k) it fails.&amp;nbsp; So for example;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;If([Product Class] = 'X', [Gender - 1],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If([Product Class] = 'Y', [Gender - 2], 'FALSE'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For every case of Product Class = X, it returns Gender 1 field correctly.&amp;nbsp; For 99% of Y Product Class, it correctly returns Gender 2 field.&amp;nbsp; However, for 3 records with Product Class Y, it returns "FALSE."&amp;nbsp; Where things get very odd, though, is if I change the formula to be any other field besides Gender 2, it returns the correct value for those 3 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it resorts to FALSE, saying the second If Statement is false, specifically ONLY for the Gender - 2 field.&amp;nbsp; Any other field, or if we hard-code it, it comes back as True and provides the correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone think of a reason why this would be happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 13:27:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Function-not-working-for-one-field/m-p/1205111#M462015</guid>
      <dc:creator />
      <dc:date>2016-11-02T13:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: If Function not working for one field</title>
      <link>https://community.qlik.com/t5/QlikView/If-Function-not-working-for-one-field/m-p/1205112#M462016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I can't, besides the obvious answer that the contents of Gender2 are 'FALSE' for these records. Are you able to provide us with those three records along with a sample document replicating the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 14:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Function-not-working-for-one-field/m-p/1205112#M462016</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2016-11-02T14:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: If Function not working for one field</title>
      <link>https://community.qlik.com/t5/QlikView/If-Function-not-working-for-one-field/m-p/1205113#M462017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You might try:&lt;/P&gt;&lt;P&gt;If(trim(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Product Class]) = 'Y',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If(index(&lt;SPAN style="font-size: 13.3333px;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Product Class],'Y')&amp;gt;0,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 14:49:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-Function-not-working-for-one-field/m-p/1205113#M462017</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2016-11-02T14:49:55Z</dc:date>
    </item>
  </channel>
</rss>

