<?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: Expression issue with if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442722#M165018</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check like this&lt;/P&gt;&lt;P&gt;Len() function and note that the length of segment1 by using rtrim and without rtrim function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps to find the difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Nov 2012 20:58:33 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2012-11-16T20:58:33Z</dc:date>
    <item>
      <title>Expression issue with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442721#M165017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone know what could cause the following?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression returns 0 UNLESS I apply rtrim() to the field in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Segment 1]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='700400', &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Credit Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Debit Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;This function returns the correct value if the charts dimension is set to [Segment 1]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Segment 1]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='700400', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Credit Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Debit Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;This makes absolutely no sense to me. And Yes I have checked, without Rtrim applied the values in [Segment 1] contain no leading or trailing spaces, and I do have Verbatim set=1 And the field is formated at Text.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 20:53:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442721#M165017</guid>
      <dc:creator />
      <dc:date>2012-11-16T20:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Expression issue with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442722#M165018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check like this&lt;/P&gt;&lt;P&gt;Len() function and note that the length of segment1 by using rtrim and without rtrim function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps to find the difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 20:58:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442722#M165018</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-11-16T20:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Expression issue with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442723#M165019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both return result of 6. I also forgot to mention that the first expression will also return the correct value if I select the value 700400 in [Segment 1].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also the following works for all situations, I just need to know the reason before I go and start changing things, as thing may be more widespread than I am aware.&lt;/P&gt;&lt;P&gt;sum&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Segment 1]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'700400'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Credit Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Debit Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 21:03:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442723#M165019</guid>
      <dc:creator />
      <dc:date>2012-11-16T21:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Expression issue with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442724#M165020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis gives better performance when compare to if statement.&amp;nbsp; so you can go with set analysis. Like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;[Segment 1]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'700400'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;[Credit Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;[Debit Amount]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Always prefer set analysis, mostly try to avoid if statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose, i misunderstand your question means, sorry for that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hope it helps.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 21:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442724#M165020</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-11-16T21:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression issue with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442725#M165021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I know it works, and that it is usualy better. I also usually go for set analysis, but this statment was before I new it well enough to be comfortable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am more concerned with the why due to other issues I may not think of, spread across 12 daswhboards with hundreds of possible expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 21:41:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-issue-with-if-statement/m-p/442725#M165021</guid>
      <dc:creator />
      <dc:date>2012-11-16T21:41:13Z</dc:date>
    </item>
  </channel>
</rss>

