<?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: Logic challenge in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387375#M491175</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;Try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (IsNull(PercentComp),sum(if(CategoryDesc='Financial' and Open_Clos='Closed',1,0))&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDesc='Financial' and Open_Clos='Closed' and (PercentCompletion &amp;lt;100), RemainingPercentage, 'NULL'))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I had some other work, so its take time to reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2012 18:44:23 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2012-09-07T18:44:23Z</dc:date>
    <item>
      <title>Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387368#M491168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I require some help regarding a logic challenge please....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Up to now I have used simple IF logic statements. I now need to add some (slightly) more detailed logic into my QV app which in simple terms will do the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Check 'PercentComp' field to see if a value exists or is null&lt;/LI&gt;&lt;LI&gt;If a value exists (i.e. we have a entry on the system), then sum the records that meet certain criteria e.g. sum(if(CategoryDescription='Financial' and Due_Date&amp;gt;today(2), 1-(PercentComp/100), NULL))&lt;/LI&gt;&lt;LI&gt;If a value does not exist then count the records that meet certain criteria e.g. count(if(status='open' and Due_Date&amp;gt;today(2) and CategoryDescription='Financial'&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above fields reside in two tables:&lt;/P&gt;&lt;P&gt;Table 1 = PercentComp&lt;/P&gt;&lt;P&gt;Table 2 = CategoryDescription, Due_Date,status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for guidance as to the best way to do this. I would ideally like to handle most of the logic within the script as I am getting 'Out of Object Memory' quite a bit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 14:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387368#M491168</guid>
      <dc:creator />
      <dc:date>2012-09-07T14:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387369#M491169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;something like this should do the trick:&lt;/P&gt;&lt;P&gt;if (IsNull(PercentComp)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(status='open' and Due_Date&amp;gt;today(2) and CategoryDescription='Financial'),1,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDescription='Financial' and Due_Date&amp;gt;today(2), 1-(PercentComp/100), NULL))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 14:40:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387369#M491169</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-09-07T14:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387370#M491170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gwassenaar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to do this within the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 15:34:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387370#M491170</guid>
      <dc:creator />
      <dc:date>2012-09-07T15:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387371#M491171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting null returns when I use the IF statement that you kindly prepared for me. The syntax looks correct and I have even stripped it back for troubleshooting purposes however it is still the same - see code below.&lt;/P&gt;&lt;P&gt;There are plenty of records that meet this criteria. Even if there werent't I should be getting 0 rather than null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas please? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (IsNull(PercentComp)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDescription='Financial'),1,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDescription='Financial', 1-(PercentComp/100), NULL))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 16:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387371#M491171</guid>
      <dc:creator />
      <dc:date>2012-09-07T16:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387372#M491172</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;if (IsNull(PercentComp)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDescription='Financial',1,0))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDescription='Financial', 1-(PercentComp/100), NULL))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 16:53:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387372#M491172</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-09-07T16:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387373#M491173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mayil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears to work, however it has caused an 'Out of object memory' error!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can I do to resolve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 17:27:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387373#M491173</guid>
      <dc:creator />
      <dc:date>2012-09-07T17:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387374#M491174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok - I have resolved the out of memory issue, however my results are still 'null'.&lt;/P&gt;&lt;P&gt;Help please?! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (IsNull(PercentComp) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDesc='Financial' and Open_Clos='Closed',1,0))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDesc='Financial' and Open_Clos='Closed' and PercentCompletion&amp;lt;100, RemainingPercentage), NULL))&lt;BR /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 18:12:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387374#M491174</guid>
      <dc:creator />
      <dc:date>2012-09-07T18:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387375#M491175</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;Try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (IsNull(PercentComp),sum(if(CategoryDesc='Financial' and Open_Clos='Closed',1,0))&amp;nbsp;&amp;nbsp;&amp;nbsp; ,sum(if(CategoryDesc='Financial' and Open_Clos='Closed' and (PercentCompletion &amp;lt;100), RemainingPercentage, 'NULL'))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I had some other work, so its take time to reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2012 18:44:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387375#M491175</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-09-07T18:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Logic challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387376#M491179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the reason that I am getting null is due to the first IF statement. The field 'PercentComp' will not exist in all cases. I presume this is treated different lt to a null?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the best way to evaluate the existance of a field for not?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2012 12:12:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-challenge/m-p/387376#M491179</guid>
      <dc:creator />
      <dc:date>2012-09-10T12:12:35Z</dc:date>
    </item>
  </channel>
</rss>

