<?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 AND Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249893#M1192235</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if((GLnum=10040 or GLnum=10041 or GLnum=10045) and Jobno&amp;lt;&amp;gt;'' and Industrycode='',Sum(Amount),0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Aug 2011 12:32:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-04T12:32:27Z</dc:date>
    <item>
      <title>IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249892#M1192234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some criteria which consists of the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G/L Number&lt;/P&gt;&lt;P&gt;10040,10041,10045,10050,10051,10055,10060,10061,10065,10100,10101,10105&lt;/P&gt;&lt;P&gt;Job No.&lt;/P&gt;&lt;P&gt;Industry Code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The idea is that:&lt;/P&gt;&lt;P&gt;IF G/L Number = 10040,10041,10045&lt;/P&gt;&lt;P&gt;AND Job No. -='' " (does not equal)&lt;/P&gt;&lt;P&gt;AND Industry Code =" "&lt;/P&gt;&lt;P&gt;SUM(Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Ideas on how I can tackle this would be highly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 12:26:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249892#M1192234</guid>
      <dc:creator />
      <dc:date>2011-08-04T12:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249893#M1192235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if((GLnum=10040 or GLnum=10041 or GLnum=10045) and Jobno&amp;lt;&amp;gt;'' and Industrycode='',Sum(Amount),0)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 12:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249893#M1192235</guid>
      <dc:creator />
      <dc:date>2011-08-04T12:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249894#M1192236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As asked, the above looks correct, though you can avoid the ORs by using a match():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(match(GLnum,10040,10041,10045) and "Job No."&amp;lt;&amp;gt;' ' and "Industry Code"=' ',sum(Amount))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I suspect that what you really want to do is sum up the Amounts of all records where those conditions are true.&amp;nbsp; For that, you do the if() inside of the sum():&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(if(match(GLnum,10040,10041,10045) and "Job No."&amp;lt;&amp;gt;' ' and "Industry Code"=' ',Amount))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;And if you want it to perform well, you use set analysis instead:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;GLnum*={10040,10041,10045},"Job No."-={' '},"Industry Code"*={' '}&amp;gt;} Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 23:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249894#M1192236</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-04T23:48:55Z</dc:date>
    </item>
    <item>
      <title>IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249895#M1192237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This will do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;[G/L Number]={10040,10041,10045},[Job No.]-={'',NULL},[Industry Code]={'',NULL}&amp;gt;} Amount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 00:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249895#M1192237</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2011-08-05T00:24:15Z</dc:date>
    </item>
    <item>
      <title>IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249896#M1192238</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;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum(if(match(GLnum,10040,10041,10045) and Isnull(JobNo.) and Isnull(IndustryCode),Amount))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 05:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249896#M1192238</guid>
      <dc:creator>rahulgupta</dc:creator>
      <dc:date>2011-08-05T05:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249897#M1192239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone!,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answers. However, syntactically they seem ok, I am not getting any results. I believe this may be because of the tables being dependant of each other. (i'm not 100% sure how Qlikview works) I've attached an image below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Qlikview.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/6298_Qlikview.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;so as you can see. IF the there is a Job Number it will look for a customer number. IF there is not a customer number the industry code will obviously be blank (as it cannot find the link). However (please correct me if im wrong), Qlikview will not do this check because there is no link between customer and industry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the assumption that it see's it as blank regardless.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 08:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249897#M1192239</guid>
      <dc:creator />
      <dc:date>2011-08-05T08:34:19Z</dc:date>
    </item>
    <item>
      <title>IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249898#M1192240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; So by seeing your cloud you should join the jobcode from the GL table with Jobcode in Job table &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;even if the column is null so by default nulls will not be joined in qlikview so using the variable &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;NullAsValue JobNo; Will connect the tables even if the fields have null value by this way &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold;"&gt;u can see the data &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 11:05:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249898#M1192240</guid>
      <dc:creator>qliksus</dc:creator>
      <dc:date>2011-08-05T11:05:36Z</dc:date>
    </item>
    <item>
      <title>IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249899#M1192241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;I want to learn what does this expression mean&lt;/P&gt;&lt;P&gt;sum({&amp;lt;GLnum*={10040,10041,10045} ....)&lt;/P&gt;&lt;P&gt;I wish to know the significance of the asterisk * used. Wouldn't this expression work without the asterisk *.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bikash Debnath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 17:45:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249899#M1192241</guid>
      <dc:creator />
      <dc:date>2011-08-05T17:45:10Z</dc:date>
    </item>
    <item>
      <title>IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249900#M1192242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The *= specifies intersection, or as I think of it, it restricts my selections to no more than the indicated values.&amp;nbsp; It's the same behavior as a sum(if()).&amp;nbsp; I can still select just 10040, and I'll then only see 10040.&amp;nbsp; If I select 12345, the chart will not display data, which in some cases may help prevent confusion about what the user is looking at.&amp;nbsp; I typically use the *= as I feel it is a more natural, more normal behavior than the =, which is a pure, static override.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 19:13:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249900#M1192242</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-05T19:13:48Z</dc:date>
    </item>
    <item>
      <title>IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249901#M1192243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you John,&lt;/P&gt;&lt;P&gt;You really explain well. Love it!&lt;/P&gt;&lt;P&gt;I understood the idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with best regards,&lt;/P&gt;&lt;P&gt;Bikash Debnath&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 19:19:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249901#M1192243</guid>
      <dc:creator />
      <dc:date>2011-08-05T19:19:32Z</dc:date>
    </item>
    <item>
      <title>IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249902#M1192244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am I the only one or are there others who experience the same problem:&lt;/P&gt;&lt;P&gt;in a set analysis, if using&amp;nbsp; -= or *= the intelisense (autocomplete) stops working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Josh Duenyas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 19:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249902#M1192244</guid>
      <dc:creator>jduenyas</dc:creator>
      <dc:date>2011-08-05T19:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249903#M1192245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mate&lt;/P&gt;&lt;P&gt;I have a similar issue with if in the chart expression: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is basically this: &lt;/P&gt;&lt;P&gt;Chart Dimension: Mth (like Jan, Feb , ...) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For Current month comparing due date of each ID with Today() and counting the overdued IDs &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; For past months, comparing the due date of each ID with LastDayOfTheMonth (Which is a master calendar field date I added) &lt;/P&gt;&lt;P&gt;This is my expression which is not working: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If (Mth=date(Today(),'MMM'), Count(&amp;nbsp; {&amp;lt;DueDate={"&amp;lt;=$(=Today())"}&amp;gt;} Comp_ID),Count(&amp;nbsp; {&amp;lt;DueDate={"&amp;lt;=$(=LastDayOfTheMonth)"}&amp;gt;} Comp_ID ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 05:29:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249903#M1192245</guid>
      <dc:creator>arixooo123</dc:creator>
      <dc:date>2018-02-28T05:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249904#M1192246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;&amp;gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;the intelisense (autocomplete) stops working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That was a problem on versions of QV prior to 11.20 SR7 or SR8 (I think that was about 2 years ago). You may want to upgrade to a more recent version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 05:51:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249904#M1192246</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-02-28T05:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249905#M1192247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan, &lt;/P&gt;&lt;P&gt;Hope you're well. Could you please have a look at my expression : &lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;My requirement is basically this:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Chart Dimension: Mth (like Jan, Feb , ...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;For Current month comparing due date of each ID with Today() and counting the overdued IDs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;For past months, comparing the due date of each ID with LastDayOfTheMonth (Which is a master calendar field date I added)&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;This is my expression which is not working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;If (Mth=date(Today(),'MMM'), Count(&amp;nbsp; {&amp;lt;DueDate={"&amp;lt;=$(=Today())"}&amp;gt;} Comp_ID),Count(&amp;nbsp; {&amp;lt;DueDate={"&amp;lt;=$(=LastDayOfTheMonth)"}&amp;gt;} Comp_ID ))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 05:54:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249905#M1192247</guid>
      <dc:creator>arixooo123</dc:creator>
      <dc:date>2018-02-28T05:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: IF AND Expression</title>
      <link>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249906#M1192248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its not a good idea to hijack a thread with another question. Please open a new thread with your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 05:59:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-AND-Expression/m-p/249906#M1192248</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2018-02-28T05:59:25Z</dc:date>
    </item>
  </channel>
</rss>

