<?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 Nest If Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nest-If-Statement/m-p/515355#M685510</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our current process is we have a chart with the following expression in it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Aggr(count(WOID),AcctNum)= 0,0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;lt; .1,0,0),AcctNum)+&lt;/P&gt;&lt;P&gt;aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;gt;= .1,1,0),AcctNum)&lt;/P&gt;&lt;P&gt;+aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;gt;= .3,1,0),AcctNum)&lt;/P&gt;&lt;P&gt;+aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;gt;= .4,1,0),AcctNum)&lt;/P&gt;&lt;P&gt;+aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;gt;= .6,1,0),AcctNum)&lt;/P&gt;&lt;P&gt;+aggr(IF(sum({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}ActualHours)/count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID) &amp;gt;= .5,1,0),AcctNum))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is move it to the Load Statement.&amp;nbsp; What I am trying to accomplish is once I count the WOID for each account, I look at the Status of each of the WOID's and if they are complete and closed I divide them by the Number of Students.&amp;nbsp; If the results is less that .1 they get a score of 0.&amp;nbsp; I continue that same process with each account giving them a score up to 4.&amp;nbsp; If they track hours on work orders I divide that by the number of WOID's and if the result is .5 of higher they get a point.&amp;nbsp; So for each account they get a score of 0 to 4 and if they do the Actual Hours they can earn a point as well.&amp;nbsp; Can this be accomplished in the Load Statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Dec 2013 16:10:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-12-20T16:10:33Z</dc:date>
    <item>
      <title>Nest If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Nest-If-Statement/m-p/515355#M685510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Our current process is we have a chart with the following expression in it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Aggr(count(WOID),AcctNum)= 0,0,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;lt; .1,0,0),AcctNum)+&lt;/P&gt;&lt;P&gt;aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;gt;= .1,1,0),AcctNum)&lt;/P&gt;&lt;P&gt;+aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;gt;= .3,1,0),AcctNum)&lt;/P&gt;&lt;P&gt;+aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;gt;= .4,1,0),AcctNum)&lt;/P&gt;&lt;P&gt;+aggr(IF(count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID)/Students__c &amp;gt;= .6,1,0),AcctNum)&lt;/P&gt;&lt;P&gt;+aggr(IF(sum({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}ActualHours)/count({&amp;lt;StatusDesc = {"Complete", "Closed*"}&amp;gt;}WOID) &amp;gt;= .5,1,0),AcctNum))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is move it to the Load Statement.&amp;nbsp; What I am trying to accomplish is once I count the WOID for each account, I look at the Status of each of the WOID's and if they are complete and closed I divide them by the Number of Students.&amp;nbsp; If the results is less that .1 they get a score of 0.&amp;nbsp; I continue that same process with each account giving them a score up to 4.&amp;nbsp; If they track hours on work orders I divide that by the number of WOID's and if the result is .5 of higher they get a point.&amp;nbsp; So for each account they get a score of 0 to 4 and if they do the Actual Hours they can earn a point as well.&amp;nbsp; Can this be accomplished in the Load Statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 16:10:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nest-If-Statement/m-p/515355#M685510</guid>
      <dc:creator />
      <dc:date>2013-12-20T16:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Nest If Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Nest-If-Statement/m-p/515356#M685511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this will work. Note I assumed you had all the fields in the same table (I call it "BaseData").&amp;nbsp; if you don't you will need to do that in advance of my script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BaseData:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;Students__c,&lt;/P&gt;&lt;P&gt;AcctNum,&lt;/P&gt;&lt;P&gt;WOID,&lt;/P&gt;&lt;P&gt;StatusDesc,&lt;/P&gt;&lt;P&gt;ActualHours&lt;/P&gt;&lt;P&gt;From Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;AcctNum,&lt;/P&gt;&lt;P&gt;If(Floor(Count (WOID) / Student__c *10) &amp;gt; 4, 4, Floor(Count (WOID) / Student__c *10))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; + if(Sum(ActualHours)/count(WOID) &amp;gt;0.5,1,0) as Score&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident BaseData&lt;/P&gt;&lt;P&gt;Where StatusDesc = 'Complete' or StatusDesc&amp;nbsp; like 'Closed*'&lt;/P&gt;&lt;P&gt;Group by AcctNum;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2013 17:23:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nest-If-Statement/m-p/515356#M685511</guid>
      <dc:creator>Josh_Good</dc:creator>
      <dc:date>2013-12-20T17:23:22Z</dc:date>
    </item>
  </channel>
</rss>

