<?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 Error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702645#M668072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan Sir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need your help on this post:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/145417"&gt;Exclude Holidays &amp;amp;amp; their Time from Running Logic...............!!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible, kindly look into this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Dec 2014 17:45:10 GMT</pubDate>
    <dc:creator>aveeeeeee7en</dc:creator>
    <dc:date>2014-12-11T17:45:10Z</dc:date>
    <item>
      <title>Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702622#M668049</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 am doing Calculation of Numbers based on Logic.&lt;/P&gt;&lt;P&gt;The &lt;STRONG style="font-size: 12pt;"&gt;Correct&lt;/STRONG&gt; Calculation are &lt;STRONG style="font-size: 12pt;"&gt;Green&lt;/STRONG&gt; in Color and&lt;STRONG style="font-size: 12pt;"&gt; Wrong&lt;/STRONG&gt; Calculation is &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Red&lt;/STRONG&gt;&lt;/SPAN&gt; in Color.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calculation&lt;STRONG style="font-size: 12pt;"&gt; Time Difference&lt;/STRONG&gt; between &lt;STRONG style="font-size: 12pt;"&gt;CreationTime&lt;/STRONG&gt; &amp;amp; &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;OutTime &lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;based on:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;The &lt;/SPAN&gt;&lt;STRONG style="font-size: 12pt;"&gt;Creation Time &amp;amp; End Time&lt;/STRONG&gt; should be considered between &lt;STRONG style="font-size: 12pt;"&gt;StartTime &amp;amp; EndTime.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am explaining 2 scenarios how the Calculation is done:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Case No.1:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-639303-69436/WRONG dURATION.png"&gt;&lt;IMG alt="WRONG dURATION.png" class="jive-image jiveImage" height="48" src="/legacyfs/online/69768_WRONG dURATION.png" width="716" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Creation Time&lt;/STRONG&gt;&lt;/SPAN&gt; is&amp;nbsp; 25/3/2014 1:11:24 PM&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;OutTime&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is&amp;nbsp;&amp;nbsp; 31/3/2014 7:40:00 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Reload Attached qvd DataMainData&lt;/STRONG&gt;&lt;/SPAN&gt;, than you'll see its Working weekdays are different for individual Numbers.&lt;/P&gt;&lt;P&gt;For some of the cases Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Fri&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; For some of the cases Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Sat&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;It's Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Fri&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, calculate difference b/w OutTime &amp;amp; CreationTime by considering Start Time &amp;amp; End Time i.e. different individual Numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;25 = 4:18:36 hrs ( Hours b/w 9:00 to 17:30)&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Calculation=(17:30 - 1:11:24 = 4:18:36)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;26 = 8:30 hrs&amp;nbsp; ( Hours b/w 9:00 to 17:30)&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Calculation=(17:30 - 9:00= 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;27 = 8:30 hrs&amp;nbsp; ( Hours b/w 9:00 to 17:30)&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Calculation=(17:30 - 9:00= 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;28 = 8:30 hrs&amp;nbsp; ( Hours b/w 9:00 to 17:30)&amp;nbsp; &lt;STRONG&gt;Calculation=(17:30 - 9:00= 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;29 = 0 hrs&amp;nbsp;&amp;nbsp; ( Saturdayto be excluded since Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Fri&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;30 = 0 hrs&amp;nbsp; ( Sunday to be excluded since Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Fri&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;31 = 8:30 hrs&amp;nbsp; ( Hours b/w 9:00 to 17:30)&amp;nbsp; &lt;STRONG&gt; Calculation=(17:30 - 9:00= 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum of All = &lt;STRONG&gt;4:18:36 hrs + 8:30 hrs + 8:30 hrs + 8:30 hrs + 8:30 hrs = 38:18:36 hrs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Case No.2:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-639303-69444/Right Duration.png"&gt;&lt;IMG alt="Right Duration.png" class="jive-image jiveImage" height="48" src="/legacyfs/online/69769_Right Duration.png" width="716" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Creation Time&lt;/STRONG&gt;&lt;/SPAN&gt; is&amp;nbsp; 30/3/2014 11:46:39 AM&lt;/P&gt;&lt;P&gt;&amp;amp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;OutTime&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is&amp;nbsp;&amp;nbsp; 5/4/2014 5:00:00 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Reload Attached qvd DataMainData&lt;/STRONG&gt;&lt;/SPAN&gt;, than you'll see its Working weekdays are different for individual Numbers.&lt;/P&gt;&lt;P&gt;For some of the cases Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Fri&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;amp; For some of the cases Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Sat&lt;/STRONG&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: 12pt;"&gt;&lt;STRONG&gt;It's Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Sat&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, calculate difference b/w OutTime &amp;amp; CreationTime by considering Start Time &amp;amp; End Time i.e. different individual Numbers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;30 = 0 hrs&amp;nbsp; ( Sunday to be excluded since Working Weekdays are &lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Mon - Sat&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;31 = 8:30 hrs ( Hours b/w 9:30 to 18:00)&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Calculation=(18:00 - 9:30 = 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp; = 8:30 hrs ( Hours b/w 9:30 to 18:00)&amp;nbsp; &lt;STRONG&gt;Calculation=(18:00 - 9:30 = 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2&amp;nbsp; = 8:30 hrs ( Hours b/w 9:30 to 18:00)&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Calculation=(18:00 - 9:30 = 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3&amp;nbsp; = 8:30 hrs ( Hours b/w 9:30 to 18:00)&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Calculation=(18:00 - 9:30 = 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;4 = 8:30 hrs ( Hours b/w 9:30 to 18:00)&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Calculation=(18:00 - 9:30 = 8:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;5&amp;nbsp; = 7:30 hrs ( Hours b/w 9:30 to 18:00)&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Calculation=(5:00 - 9:30 = 7:30:00)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sum of All = &lt;STRONG&gt;8:30 hrs+ 8:30 hrs + 8:30 hrs + 8:30 hrs + 8:30 hrs + 7:30 hrs = 50:00:00 hrs&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Kindly, someone help. It's a tricky logic.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Av7eN&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 13:28:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702622#M668049</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-27T13:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702623#M668050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have any other table have which week are Mon-Sat working days ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 14:25:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702623#M668050</guid>
      <dc:creator />
      <dc:date>2014-10-27T14:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702624#M668051</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;Below is the Snapshot for following cases:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Monday - Friday&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Monday - Saturday&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Mon-Sat.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/69778_Mon-Sat.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, see the Attachment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Oct 2014 16:10:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702624#M668051</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-27T16:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702625#M668052</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;I've put something together which solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 21:32:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702625#M668052</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-28T21:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702626#M668053</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;Thanks Stefan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In one case - 1399974 I am getting problem. Please help on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As per your Logic it's answer is coming as 10:23 but the correct answer should come as 1:00&lt;/P&gt;&lt;P&gt;&lt;IMG alt="hfghfghghgfh.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70006_hfghfghghgfh.png" style="width: 620px; height: 152px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 18:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702626#M668053</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-29T18:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702627#M668054</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;can't test this as your testdata doesnt have this Ticket, but try modifying the part of the script where all is summed&amp;nbsp; up like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; NumSum( &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pick(WeekDay6Flag + 1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((WeekDay &amp;lt;= 5 and WeekDay &amp;gt;= 1) and [Cal Date] &amp;lt; EndDay and [Cal Date]&amp;gt; StartDay, WorkingHours),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( (WeekDay &amp;lt;= 6 and WeekDay &amp;gt;= 1) and [Cal Date] &amp;lt; EndDay and [Cal Date]&amp;gt; StartDay, WorkingHours)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) , &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pick(WeekDay6Flag + 1, if( (WeekDay &amp;lt;= 5 and WeekDay &amp;gt;= 1) and [Cal Date]= StartDay &lt;STRONG&gt;and [Cal Date] &amp;lt;&amp;gt; EndDay&lt;/STRONG&gt; , HoursStartDay2),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((WeekDay &amp;lt;= 6 and WeekDay &amp;gt;= 1) and [Cal Date]= StartDay &lt;STRONG&gt;and [Cal Date] &amp;lt;&amp;gt; EndDay&lt;/STRONG&gt;, HoursStartDay2 )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) , &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pick ( WeekDay6Flag +1, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((WeekDay &amp;lt;= 5 and WeekDay &amp;gt;= 1) and [Cal Date]= EndDay, HoursEndDay2),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((WeekDay &amp;lt;= 6 and WeekDay &amp;gt;= 1) and [Cal Date]= EndDay, HoursEndDay2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ) as SumWorkingHours&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 19:42:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702627#M668054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-29T19:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702628#M668055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir&lt;/P&gt;&lt;P&gt;Your Previous Logic was perfect&lt;/P&gt;&lt;P&gt;One Last Question hopefully.&lt;/P&gt;&lt;P&gt;The 2 cases '1189675' and '1174767'&amp;nbsp; I have tested which have Window from Mon-Sun 24*7 so in that case no need to exclude anything from such cases.&lt;/P&gt;&lt;P&gt;Some More cases which are causing problem are:&lt;/P&gt;&lt;P&gt;'1255249','1473485','1261332','1196672'&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Wrong Resulttt.png" class="jive-image" src="/legacyfs/online/70037_Wrong Resulttt.png" style="width: 620px; height: 202px;" /&gt;&lt;/P&gt;&lt;P&gt;Also, when I am adding my All cases Qvd (&lt;SPAN class="j-attachment-name-chop" style="font-size: 12pt;"&gt;&lt;STRONG&gt;Latest_Final_Main_Table.qvd&lt;/STRONG&gt;&lt;/SPAN&gt; ) into your Logic, than it got hanged. Is this happening due to generated calendar or due to large Records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 20:44:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702628#M668055</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-29T20:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702629#M668056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Causing Problem:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Req Res.png" class="jive-image" src="/legacyfs/online/70095_Req Res.png" style="width: 620px; height: 104px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 11:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702629#M668056</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-30T11:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702630#M668057</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;didn't had the cases in my mind when Tickets are solved on one day, added some code to cover these. (See qvw for this).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the missing two minutes probably result from the enddate of 23:59. Actually there are 59 Seconds missing, so the result shoud be like 47:17:01 but this is not captured by your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your "big" qvd fails because there are some fields missing in this table you have to remove them from the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 18:04:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702630#M668057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-30T18:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702631#M668058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your Logic is working.&lt;/P&gt;&lt;P&gt;But I have 2 issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) When I am testing with only October Data than the Logic is getting Hanged.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="NewewwwwwwwwwwAviraaal.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70197_NewewwwwwwwwwwAviraaal.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The Case - '1399974' is not coming as per the new Logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 08:17:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702631#M668058</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-31T08:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702632#M668059</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;what do you mean by logic gets hanged?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for 2) replace&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( StartDay = EndDay and OutTime &amp;lt;=&amp;nbsp; EndTimeOutTime and CreationTime &amp;gt;= StartTimeOutTime, OutTime - CreationTime ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( StartDay&amp;nbsp; = EndDay and OutTime &amp;gt; EndTimeOutTime&amp;nbsp; and CreationTime&amp;nbsp; &amp;lt; StartTimeOutTime, EndTimeOutTime- StartTimeOutTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( StartDay = EndDay and OutTime&amp;gt;&amp;nbsp; EndTimeOutTime and CreationTime &amp;gt;= StartTimeOutTime, EndTimeOutTime- CreationTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( StartDay = EndDay and OutTime&amp;lt;=&amp;nbsp; EndTimeOutTime and CreationTime &amp;lt; StartTimeOutTime,OutTime- StartTimeOutTime ))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Last Case was not correct)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 08:47:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702632#M668059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-31T08:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702633#M668060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect Sir.&lt;/P&gt;&lt;P&gt;You are very quick. Amazing Stuff.......!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sir, Logic gets hanged means. I have a qvd which has large data.&lt;/P&gt;&lt;P&gt;When I am Replacing that qvd in your logic. Suppose, I have tested it with only October data than the Reload is not processing after Calendar Code and it is forming Synthetic keys. Since, the table was not Dropped there and you've picked All fields there by using Load *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 08:56:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702633#M668060</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-31T08:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702634#M668061</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;you are welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for october data it works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="70214" alt="Scriptfinish.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70214_Scriptfinish.png" style="width: 620px; height: 529px;" /&gt;&lt;/P&gt;&lt;P&gt;If you mean your script hangs then you have to wait some time as during script execution the counter not always shows progress when qv is performing resource intensive actions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nevertheless, you can use this code (after calculation of hours) to remove synthetic key:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;NoConcatenate &lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;StartDay&amp;amp;&amp;nbsp; '|' &amp;amp;&lt;/P&gt;&lt;P&gt;EndDay as %IntervallKey,&lt;/P&gt;&lt;P&gt;SumWorkingHours&amp;nbsp; as Duration&lt;/P&gt;&lt;P&gt;Resident Table2;&lt;/P&gt;&lt;P&gt;drop Fields StartDay, EndDay from Final; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Tables Table2, Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (Calendar1)&lt;/P&gt;&lt;P&gt;IntervalMatch ([Cal Date])&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;date(floor(num(CreationTime)), 'DD/MM/YYYY') as StartDay,&lt;/P&gt;&lt;P&gt;date(floor(num(OutTime)), 'DD/MM/YYYY') as EndDay&lt;/P&gt;&lt;P&gt;Resident Final;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;load*,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;StartDay&amp;amp;&amp;nbsp; '|' &amp;amp;&lt;/P&gt;&lt;P&gt;EndDay as %IntervallKey&lt;/P&gt;&lt;P&gt;Resident Calendar1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Fields StartDay, EndDay from Calendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop Table Calendar1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 09:44:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702634#M668061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-31T09:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702635#M668062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Reload is working but now new problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting Wrong Result after using October Data.&lt;/P&gt;&lt;P&gt;I am sorry, you are trying so hard and I am keep on raising questions????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 09:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702635#M668062</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-31T09:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702636#M668063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I am using single or few cases with small qvd than I am getting Right Result&lt;/P&gt;&lt;P&gt;but when I am using all the cases with large qvd than I am getting Wrong Result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is happening due to the Synthetic Keys forming at earlier stage of script which is Multiplying the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Problem is here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="NewewwwwwwwwwwAviraaal.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70218_NewewwwwwwwwwwAviraaal.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 10:02:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702636#M668063</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-31T10:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702637#M668064</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;so finally.... this was because the intervalls in your former posted data were not overlapping, adding a key to intervallmatch is the solution &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 11:11:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702637#M668064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-31T11:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: Re: Re: Re: Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702638#M668065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is Perfect.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;All Scenarios Results are Perfect except one&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Number (ticket ID) Which has CreationTime and OutTime both falling out of Start Time &amp;amp; End Time are giving wrong Results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="AllOK.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/70219_AllOK.png" style="width: 620px; height: 100px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 11:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702638#M668065</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-10-31T11:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702639#M668066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;if( StartDay = EndDay and OutTime &amp;lt;=&amp;nbsp; EndTimeOutTime and CreationTime &amp;gt;= StartTimeOutTime, OutTime - CreationTime ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( StartDay&amp;nbsp; = EndDay and OutTime &amp;gt; EndTimeOutTime&amp;nbsp; and CreationTime&amp;nbsp; &amp;lt; StartTimeOutTime , EndTimeOutTime- StartTimeOutTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( StartDay = EndDay and OutTime&amp;gt;&amp;nbsp; EndTimeOutTime and CreationTime &amp;gt;= StartTimeOutTime &lt;STRONG&gt;and&amp;nbsp; CreationTime&amp;nbsp; &amp;lt;= EndTimeOutTime&lt;/STRONG&gt; , EndTimeOutTime- CreationTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( StartDay = EndDay and OutTime&amp;lt;=&amp;nbsp; EndTimeOutTime and CreationTime &amp;lt; StartTimeOutTime,OutTime- StartTimeOutTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp; if( StartDay = EndDay and OutTime&amp;gt;&amp;nbsp; EndTimeOutTime and CreationTime &amp;gt; EndTimeOutTime, 0)))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and dont forget to uncheck surpress zero values in your table...&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Best&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Stefan&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 11:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702639#M668066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-31T11:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702640#M668067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have checked the data. Logic is working in a Perfect way.&lt;/P&gt;&lt;P&gt;I appreciate your effort and also very thankful that you devoted your valuable time on this issue.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; text-decoration: underline;"&gt;&lt;STRONG&gt;Final changes to be done&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;1) Can we make the whole logic to be stored in 1 single qvd. The current model is a &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Link Model.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="70275" alt="Data Model into One.png" class="jive-image" src="/legacyfs/online/70275_Data Model into One.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 14pt;"&gt;&lt;STRONG&gt;So, can we Make this into one Single qvd.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;2) &lt;SPAN style="font-size: 14pt; text-decoration: underline;"&gt;Issue&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Only those cases calculation is coming&amp;nbsp; whose creation date &amp;amp; out date are same.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;See below Snapshot:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="70269" alt="Both are Same.png" class="jive-image" src="/legacyfs/online/70269_Both are Same.png" style="width: 620px; height: 66px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The cases are not coming whose creation date &amp;amp; out date are different.&lt;/P&gt;&lt;P&gt;cases are:&lt;/P&gt;&lt;P&gt;1456391&lt;/P&gt;&lt;P&gt;1456412&lt;/P&gt;&lt;P&gt;1456437&lt;/P&gt;&lt;P&gt;1456458&lt;/P&gt;&lt;P&gt;1456485&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the sample cases Snapshot:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="70270" alt="Different Dates.png" class="jive-image" src="/legacyfs/online/70270_Different Dates.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earlier these all cases were coming. But after the Logic modification these cases are missing out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Nov 2014 07:52:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702640#M668067</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-11-01T07:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Logic Error</title>
      <link>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702641#M668068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir&lt;/P&gt;&lt;P&gt;I am on the verge of closure&amp;nbsp; of this logic.&lt;/P&gt;&lt;P&gt;can you help me out on the questions I've asked in the previous post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarda&lt;/P&gt;&lt;P&gt;Av7eN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Nov 2014 06:13:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Logic-Error/m-p/702641#M668068</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-11-02T06:13:58Z</dc:date>
    </item>
  </channel>
</rss>

