<?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: If statement error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692583#M675454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for clarification...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;IF(EvType= 15 AND EvParam1 &amp;gt; Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level' ) &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: 12px;"&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; font-size: 12px;"&gt;Translates to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if &lt;/P&gt;&lt;P&gt;EvType = 15&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;P&gt;EvParam1 &amp;gt; "some number"&lt;/P&gt;&lt;P&gt;if True =&amp;gt; 'Not met Service'&lt;/P&gt;&lt;P&gt;if False =&amp;gt; 'Met Service level'&lt;/P&gt;&lt;P&gt;*** if no value found in Lookup - the value is Null.&lt;/P&gt;&lt;P&gt;Have you done a simple test of your Lookup logic to make sure that works alone (without If)?&lt;/P&gt;&lt;P&gt;Can try if( (EvType=15) AND (EvParam1&amp;gt;Lookup()), true, false&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Jul 2014 20:53:20 GMT</pubDate>
    <dc:creator>Greg_Williams</dc:creator>
    <dc:date>2014-07-01T20:53:20Z</dc:date>
    <item>
      <title>If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692577#M675448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created scripting error where my statement is IF(EvType= 15 AND EvParam1 &amp;gt; Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level' ) AS ServiceEventLevelStatus, well you can imagine the part not Met Service level is correct however, For met service level I only want it so that IF(EvType= 15 AND EvParam1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 20:21:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692577#M675448</guid>
      <dc:creator />
      <dc:date>2014-07-01T20:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692578#M675449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand it is doing an else for all evTypes, I just need it for evType 15. Thank You in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 20:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692578#M675449</guid>
      <dc:creator />
      <dc:date>2014-07-01T20:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692579#M675450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is "15" a number or text? Table Viewer window &amp;gt; highlight over field &amp;gt; text or int/num? All is spelled correctly (case sensitive)? Perhaps use ( ) parenthesis to control the logic block.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 20:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692579#M675450</guid>
      <dc:creator>Greg_Williams</dc:creator>
      <dc:date>2014-07-01T20:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692580#M675451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Number &lt;BR /&gt;tinyint to be exact in the db&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 20:36:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692580#M675451</guid>
      <dc:creator />
      <dc:date>2014-07-01T20:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692581#M675452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;trying it but don't know where to block it up getting errors all around&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 20:39:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692581#M675452</guid>
      <dc:creator />
      <dc:date>2014-07-01T20:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692582#M675453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to do it only for evtype 15 not the other evtypes, current with this statement IF(EvType= 15 AND EvParam1 &amp;gt; Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level' ) AS ServiceEventLevelStatus, &lt;/P&gt;&lt;P&gt;I am getting the correct results for 'Not met Service level"&amp;nbsp; but for met Service level it is showing that for all evTypes , However I just need it for evType 15&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 20:47:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692582#M675453</guid>
      <dc:creator />
      <dc:date>2014-07-01T20:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692583#M675454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just for clarification...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;IF(EvType= 15 AND EvParam1 &amp;gt; Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level' ) &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: 12px;"&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; font-size: 12px;"&gt;Translates to:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;if &lt;/P&gt;&lt;P&gt;EvType = 15&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;P&gt;EvParam1 &amp;gt; "some number"&lt;/P&gt;&lt;P&gt;if True =&amp;gt; 'Not met Service'&lt;/P&gt;&lt;P&gt;if False =&amp;gt; 'Met Service level'&lt;/P&gt;&lt;P&gt;*** if no value found in Lookup - the value is Null.&lt;/P&gt;&lt;P&gt;Have you done a simple test of your Lookup logic to make sure that works alone (without If)?&lt;/P&gt;&lt;P&gt;Can try if( (EvType=15) AND (EvParam1&amp;gt;Lookup()), true, false&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 20:53:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692583#M675454</guid>
      <dc:creator>Greg_Williams</dc:creator>
      <dc:date>2014-07-01T20:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692584#M675455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nope no null values, however if I switch the operators then it is still correct Current My express Translates to: if EvType = 15 AND EvParam1 &amp;gt; "some number" if True =&amp;gt; 'Not met Service' if False =&amp;gt; 'Met Service level' However I want it to show Translates to: if EvType = 15 AND EvParam1 &amp;gt; "some number" if True =&amp;gt; 'Not met Service' if False =&amp;gt; EvType = 15 AND EvParam1 &amp;gt; "some number"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 21:04:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692584#M675455</guid>
      <dc:creator />
      <dc:date>2014-07-01T21:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692585#M675456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; = ' Met service level '&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 21:05:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692585#M675456</guid>
      <dc:creator />
      <dc:date>2014-07-01T21:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692586#M675457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your False logic is including EvTypes other than 15, even though you specified that logic in the If clause?&lt;/P&gt;&lt;P&gt;Perhaps consider using: an inline table or use 0 and 1 to test logic successfully, or use set analysis for the expression instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Jul 2014 21:15:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692586#M675457</guid>
      <dc:creator>Greg_Williams</dc:creator>
      <dc:date>2014-07-01T21:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692587#M675458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need it to be a field,&amp;nbsp; where the end user can choose if it has met or not, maybe a link key can work where I link &lt;BR /&gt;evtype, evparam1 and evparam2&amp;nbsp; ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 12:26:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692587#M675458</guid>
      <dc:creator />
      <dc:date>2014-07-02T12:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692588#M675459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A list box can be created (from scratch)...and you can put in your own expression. Worth a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 12:31:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692588#M675459</guid>
      <dc:creator>Greg_Williams</dc:creator>
      <dc:date>2014-07-02T12:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692589#M675460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What would my expression be?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 12:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692589#M675460</guid>
      <dc:creator />
      <dc:date>2014-07-02T12:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692590#M675461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologizes I have never created a listbox embedded to an expression. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 12:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692590#M675461</guid>
      <dc:creator />
      <dc:date>2014-07-02T12:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692591#M675462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;New Sheet Object &amp;gt; List Box... &amp;gt; Field &amp;gt; &amp;lt;Expression&amp;gt; &amp;gt; test logic to determine if this is working as expected &amp;gt; this will be able to provide choices that can be used to filter data elements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 13:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692591#M675462</guid>
      <dc:creator>Greg_Williams</dc:creator>
      <dc:date>2014-07-02T13:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692592#M675463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried the expression but receiving nothing &lt;/P&gt;&lt;P&gt; =IF(EvType= 15 AND EvParam1 &amp;gt; SystemResponseTime, 'Not met Service Level') OR IF(EvType= 15 AND EvParam1 &amp;lt;= SystemResponseTime, '&lt;/P&gt;&lt;P&gt;Is my OR if statement negating everything?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 14:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692592#M675463</guid>
      <dc:creator />
      <dc:date>2014-07-02T14:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692593#M675464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without having a look at the data, the thing that concerns me is &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;EvParam1 &amp;gt; SystemResponseTime&lt;/SPAN&gt; (because sometimes - dates are not sometimes straight-forward...might require date(&amp;lt;date&amp;gt;,'MM-DD-YYYY') in logic. ...something like that. Have you tested one logic piece at a time to see if it works alone? Then we can stack the logic.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 14:08:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692593#M675464</guid>
      <dc:creator>Greg_Williams</dc:creator>
      <dc:date>2014-07-02T14:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692594#M675465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@evtype 15 the evparam1 is a number in seconds, and so is SystemResponseTime,&amp;nbsp; My apologies for not clarifying that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 14:50:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692594#M675465</guid>
      <dc:creator />
      <dc:date>2014-07-02T14:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692595#M675466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think it requires a nested if statement but I am not sure what to use &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 14:51:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692595#M675466</guid>
      <dc:creator />
      <dc:date>2014-07-02T14:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: If statement error</title>
      <link>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692596#M675469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can floor(&amp;lt;date&amp;gt;) to strip away the time &amp;gt; makes it easier to work with dates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jul 2014 14:52:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-statement-error/m-p/692596#M675469</guid>
      <dc:creator>Greg_Williams</dc:creator>
      <dc:date>2014-07-02T14:52:41Z</dc:date>
    </item>
  </channel>
</rss>

