<?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: working hours and overtime in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626214#M734261</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the problem is here:&lt;/P&gt;&lt;P&gt;rangesum(if(NetWorkDays(START_TIME,START_TIME,$(vHolidays)) ,&lt;BR /&gt;//&lt;STRONG&gt; round(&lt;/STRONG&gt;&lt;BR /&gt;rangesum(if(frac(START_TIME)&amp;lt;maketime($(vStartHour)),maketime($(vStartHour))-frac(START_TIME),0),&lt;BR /&gt;if(frac(END_TIME)&amp;gt;maketime($(vEndHour)),frac(END_TIME)-maketime($(vEndHour)),0))&lt;BR /&gt;&lt;BR /&gt;// &lt;STRONG&gt;,0.01)&lt;/STRONG&gt;&lt;BR /&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you try to comment this part, it seems to work well. Let me know&lt;/P&gt;</description>
    <pubDate>Fri, 20 Sep 2019 10:06:38 GMT</pubDate>
    <dc:creator>StarinieriG</dc:creator>
    <dc:date>2019-09-20T10:06:38Z</dc:date>
    <item>
      <title>working hours and overtime</title>
      <link>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626174#M734259</link>
      <description>&lt;P&gt;Hello Qlik community,&lt;/P&gt;&lt;P&gt;I am working on the calculation of hours spent on a document including office hours, week end and bank holidays.&lt;/P&gt;&lt;P&gt;I've found this very interesting dicussion&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-Documents/Business-Working-Hours-Calculation/ta-p/1477884/show-comments/true" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-Documents/Business-Working-Hours-Calculation/ta-p/1477884/show-comments/true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and implemented the solution but it seems the formula is not working if we only have out of office hours.&lt;/P&gt;&lt;P&gt;Let's set this example&lt;/P&gt;&lt;P&gt;Office hours 9-14 15-19 every day except week ends and holidays&lt;/P&gt;&lt;P&gt;If we have a document started at 08:23:00 and finished at 08:39:00 then we expect to have&lt;/P&gt;&lt;P&gt;overtime 00:16:00&lt;/P&gt;&lt;P&gt;officetime&amp;nbsp; 00:00:00&lt;/P&gt;&lt;P&gt;total time 00:00:16&lt;/P&gt;&lt;P&gt;the calculation shows 00:43:00 --&amp;gt; very strange&lt;/P&gt;&lt;P&gt;Other example :&lt;/P&gt;&lt;P&gt;document starts on 03/09/2019 20:00:00 and finished at 04/09/2019 17:00:00&lt;/P&gt;&lt;P&gt;We expect&lt;/P&gt;&lt;P&gt;overtime 13:00:00&amp;nbsp; (8pm to 9am)&lt;/P&gt;&lt;P&gt;office time 07:00:00 (9am to 2pm then 3pm to 5pm)&lt;/P&gt;&lt;P&gt;total time 20:00:00&lt;/P&gt;&lt;P&gt;the formula shows another result&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;I've created a small app so you can see the results and expected results.&lt;/P&gt;&lt;P&gt;I would need your help to find why it is not displaying the expected results.&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;In advance thanks for your contributions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 20:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626174#M734259</guid>
      <dc:creator>Hakim-A</dc:creator>
      <dc:date>2024-11-16T20:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: working hours and overtime</title>
      <link>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626177#M734260</link>
      <description>&lt;P&gt;[URL=&lt;A href="https://www.casimages.com/i/190920112546696063.jpg.html][IMG]https://nsa40.casimages.com/img/2019/09/20/190920112546696063.jpg[/IMG][/URL" target="_blank"&gt;https://www.casimages.com/i/190920112546696063.jpg.html][IMG]https://nsa40.casimages.com/img/2019/09/20/190920112546696063.jpg[/IMG][/URL&lt;/A&gt;]&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 09:25:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626177#M734260</guid>
      <dc:creator>Hakim-A</dc:creator>
      <dc:date>2019-09-20T09:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: working hours and overtime</title>
      <link>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626214#M734261</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;the problem is here:&lt;/P&gt;&lt;P&gt;rangesum(if(NetWorkDays(START_TIME,START_TIME,$(vHolidays)) ,&lt;BR /&gt;//&lt;STRONG&gt; round(&lt;/STRONG&gt;&lt;BR /&gt;rangesum(if(frac(START_TIME)&amp;lt;maketime($(vStartHour)),maketime($(vStartHour))-frac(START_TIME),0),&lt;BR /&gt;if(frac(END_TIME)&amp;gt;maketime($(vEndHour)),frac(END_TIME)-maketime($(vEndHour)),0))&lt;BR /&gt;&lt;BR /&gt;// &lt;STRONG&gt;,0.01)&lt;/STRONG&gt;&lt;BR /&gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you try to comment this part, it seems to work well. Let me know&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 10:06:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626214#M734261</guid>
      <dc:creator>StarinieriG</dc:creator>
      <dc:date>2019-09-20T10:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: working hours and overtime</title>
      <link>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626219#M734262</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works for normal hours - I've changed the script accordingly but there are still an issue&lt;/P&gt;&lt;P&gt;Let's take this example now (document G in my example)&lt;/P&gt;&lt;P&gt;Overtime should be 13:50:29 it shows 0...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;example A overtime should be 00:16:07 it shows 0&lt;/P&gt;&lt;P&gt;example B overtime should be 00:04:44 it shows 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you !&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 10:18:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626219#M734262</guid>
      <dc:creator>Hakim-A</dc:creator>
      <dc:date>2019-09-20T10:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: working hours and overtime</title>
      <link>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626291#M734263</link>
      <description>&lt;P&gt;Try to see file attached.&lt;/P&gt;&lt;P&gt;I've tried to manage all these cases, but I'm not sure that the expression will cover all possible case.&lt;/P&gt;&lt;P&gt;If you'll find a new exception you have to add a new if (let me know if you'll need help).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 13:07:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626291#M734263</guid>
      <dc:creator>StarinieriG</dc:creator>
      <dc:date>2019-09-20T13:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: working hours and overtime</title>
      <link>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626335#M734264</link>
      <description>&lt;P&gt;Indeed - I think I did not get the whole understanding of the script and need to work on that in order to catch all exceptions (someone can also work during a bank holiday or a sunday...)&lt;/P&gt;&lt;P&gt;What if we have this case ?&lt;/P&gt;&lt;P&gt;What would be the if expression ?&lt;/P&gt;&lt;P&gt;I, 02/01/2019 14:28:34, 02/01/2019 15:38:34&lt;/P&gt;&lt;P&gt;Thank you very much !&lt;/P&gt;</description>
      <pubDate>Fri, 20 Sep 2019 13:21:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1626335#M734264</guid>
      <dc:creator>Hakim-A</dc:creator>
      <dc:date>2019-09-20T13:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: working hours and overtime</title>
      <link>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1630142#M734265</link>
      <description>&lt;P&gt;Duplicate posts, see the following post for solution:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/New-to-QlikView/Business-hours-amp-overtime/m-p/1626164#M380992" target="_blank"&gt;https://community.qlik.com/t5/New-to-QlikView/Business-hours-amp-overtime/m-p/1626164#M380992&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Tue, 01 Oct 2019 15:24:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/working-hours-and-overtime/m-p/1630142#M734265</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2019-10-01T15:24:22Z</dc:date>
    </item>
  </channel>
</rss>

