<?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: Time Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Time-Calculation/m-p/888230#M470223</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If([Total Time] &amp;lt; Interval#('20', 'hh'), ([Total Time] - Interval#('10', 'hh')) * 10, &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;([Total Time] - Interval#('20', 'hh')) * 20) as [Points Conceded]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2015 12:38:36 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-06-01T12:38:36Z</dc:date>
    <item>
      <title>Time Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Time-Calculation/m-p/888229#M470222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate points based on time criteria.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To resolve a ticket, the Resolution time of the ticket should not exceed 10 hours. If it does 10 points are conceded.&lt;/P&gt;&lt;P&gt;However, if the ticket exceed 20 hours 30 points are conceded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To obtain the total time taken to resolve the ticket i use the following formula as I calculate just working hours and working time:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Date([Resolution time]) &amp;gt; 0, Floor(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; (RangeMin(18/24, Frac(Date([Resolution time]) )) -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; RangeMax(8/24, Frac(Date_Opening)) +&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; RangeMax((NetworkDays(Date_Opening, Date([Resolution time]) ) - 1) * (18/24 - 8/24), 0)) / 10)&amp;amp; ' day(s) ' &amp;amp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interval(&amp;nbsp; Frac(&amp;nbsp; (&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; RangeMin(18/24, Frac(Date(Resolution time]) )) -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; RangeMax(8/24, Frac(Date_Opening)) +&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; RangeMax((NetworkDays(Date_Opening, Date(Resolution time]) ) - 1) * (18/24 - 8/24), 0)&amp;nbsp; )&amp;nbsp; ), 'hh:mm'),0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do get the correct figures and my date and time are in the format : 0 day(s) 00:00 (named as [Total Time]).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i need to calculate the points based on these [Total Time].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if [Total Time] &amp;gt; 10 Hours and [Total Time] &amp;lt; 20 Hours, then ([Total Time] - 10Hours )*10 Points and If([Total Time]&amp;gt;=20Hours, then ([Total Time]-20Hours)*20Points.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did on excel and it works fine but on qlikview it is harder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone knows how to solve this please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hasvine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 12:27:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-Calculation/m-p/888229#M470222</guid>
      <dc:creator />
      <dc:date>2015-06-01T12:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Time Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Time-Calculation/m-p/888230#M470223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If([Total Time] &amp;lt; Interval#('20', 'hh'), ([Total Time] - Interval#('10', 'hh')) * 10, &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;STRONG&gt;([Total Time] - Interval#('20', 'hh')) * 20) as [Points Conceded]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 12:38:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-Calculation/m-p/888230#M470223</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-06-01T12:38:36Z</dc:date>
    </item>
  </channel>
</rss>

