<?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: NetWorkDays calculation with add'l logic? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845712#M1004450</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The one discussion you sent me about "Calculate hours between two Date/Time strings" had something I was looking for - simplicity. Particularly this &lt;A _jive_internal="true" href="https://community.qlik.com/message/252600#252600"&gt;post here:&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=Interval(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RangeMin(frac(Closedate), MakeTime(18)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - RangeMax(frac(Logdate), MakeTime(8)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (NetWorkDays(Logdate, Closedate-1) * MakeTime(10)) // Only 10 hours per whole day&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;/P&gt;&lt;P&gt;Just an expresssion using what QV has already. No calendar tables, nothing fancy. Fortunately, I don't need such granularity for the business hours so I don't think I need the MakeTime part. This expression works &lt;SPAN style="text-decoration: underline;"&gt;unless the request is open through the weekend&lt;/SPAN&gt;, which isn't what I need: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(num(WeekDay(incident.sys_created_on))&amp;gt;4,&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;&amp;nbsp;&amp;nbsp; 1-NetWorkDays(timestamp(incident.sys_created_on),timestamp(ReloadTime())) + Frac(timestamp(incident.sys_created_on)-Timestamp(ReloadTime(), 'hh:mm'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetWorkDays(timestamp(incident.sys_created_on),timestamp(ReloadTime())) + Frac(timestamp(incident.sys_created_on)-Timestamp(ReloadTime(), 'hh:mm')))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any further help is appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 May 2015 20:05:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-25T20:05:08Z</dc:date>
    <item>
      <title>NetWorkDays calculation with add'l logic?</title>
      <link>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845708#M1004444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't found anything in documentation pdfs or posts that address my current assignment, so I'm asking here. These are the things I'm working with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Calculate the open time for requests using the formula &lt;SPAN style="color: #0000ff; font-family: courier new,courier;"&gt;&lt;STRONG&gt;ReloadTime() - incident.open&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;If the SEV field is a "3" or "4", do NOT count open time during Saturday and Sunday&lt;/LI&gt;&lt;LI&gt;A request can be submitted at any time during the week Sun-Sat, and sometimes can be open for more than 8 days.&lt;/LI&gt;&lt;LI&gt;Results should be in dd:hh:mm format&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get results using NetWorkDays in conjunction with Frac,Interval,Time, etc as suggested in other posts on here but it's never accurate; and I'm figuring it's because of the fact that requests can be opened during the weekend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your assistance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 14:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845708#M1004444</guid>
      <dc:creator />
      <dc:date>2015-05-25T14:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: NetWorkDays calculation with add'l logic?</title>
      <link>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845709#M1004445</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(SEV=3 or SEV=4, networkingdays(&lt;STRONG style="font-size: 13px; font-family: 'courier new', courier; color: #0000ff;"&gt;ReloadTime() - incident.open), &lt;STRONG style="font-size: 13px; font-family: 'courier new', courier; color: #0000ff;"&gt;ReloadTime() - incident.open)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 14:43:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845709#M1004445</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-05-25T14:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: NetWorkDays calculation with add'l logic?</title>
      <link>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845710#M1004446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your prompt reply, Avinash, but your proposed expression is missing some things I need:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;While it addresses the SEV constraints in calculation, I still need something that accounts for requests made during the weekend as well as the dd:hh:mm format&lt;/LI&gt;&lt;LI&gt;"networkingdays" doesn't seem to be recognized by QV. NetWorkDays() is but it uses different syntax than your expression&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestions? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 15:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845710#M1004446</guid>
      <dc:creator />
      <dc:date>2015-05-25T15:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: NetWorkDays calculation with add'l logic?</title>
      <link>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845711#M1004448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try if this (and Gysbert's link) can help you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/781404"&gt;Re: Calculate Elapsed Time Nett&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 18:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845711#M1004448</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-05-25T18:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: NetWorkDays calculation with add'l logic?</title>
      <link>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845712#M1004450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The one discussion you sent me about "Calculate hours between two Date/Time strings" had something I was looking for - simplicity. Particularly this &lt;A _jive_internal="true" href="https://community.qlik.com/message/252600#252600"&gt;post here:&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=Interval(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RangeMin(frac(Closedate), MakeTime(18)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - RangeMax(frac(Logdate), MakeTime(8)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (NetWorkDays(Logdate, Closedate-1) * MakeTime(10)) // Only 10 hours per whole day&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;/P&gt;&lt;P&gt;Just an expresssion using what QV has already. No calendar tables, nothing fancy. Fortunately, I don't need such granularity for the business hours so I don't think I need the MakeTime part. This expression works &lt;SPAN style="text-decoration: underline;"&gt;unless the request is open through the weekend&lt;/SPAN&gt;, which isn't what I need: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;if(num(WeekDay(incident.sys_created_on))&amp;gt;4,&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;&amp;nbsp;&amp;nbsp; 1-NetWorkDays(timestamp(incident.sys_created_on),timestamp(ReloadTime())) + Frac(timestamp(incident.sys_created_on)-Timestamp(ReloadTime(), 'hh:mm'))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; NetWorkDays(timestamp(incident.sys_created_on),timestamp(ReloadTime())) + Frac(timestamp(incident.sys_created_on)-Timestamp(ReloadTime(), 'hh:mm')))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any further help is appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 May 2015 20:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845712#M1004450</guid>
      <dc:creator />
      <dc:date>2015-05-25T20:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: NetWorkDays calculation with add'l logic?</title>
      <link>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845713#M1004452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please share your app??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 05:20:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845713#M1004452</guid>
      <dc:creator>avinashelite</dc:creator>
      <dc:date>2015-05-26T05:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: NetWorkDays calculation with add'l logic?</title>
      <link>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845714#M1004453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, here's the trial app I've been working on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 May 2015 14:19:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/NetWorkDays-calculation-with-add-l-logic/m-p/845714#M1004453</guid>
      <dc:creator />
      <dc:date>2015-05-26T14:19:50Z</dc:date>
    </item>
  </channel>
</rss>

