<?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: Average with working days in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396281#M423824</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, your numbers are correct (I don't know how you calculate them, but they are right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;); if you replace them in my inline instruction you'll find the right partial duration and the right (based on 24h) average in the second colums; vice versa in the third column (where I applied your suggestion) you'll find both the wrong partial duration and wrong the average one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls have a look to my attachment to see them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of all, I'd like to have one table with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TicketNr Duration&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 1:30&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 7:30&lt;/P&gt;&lt;P&gt;-------------------------&lt;/P&gt;&lt;P&gt;Average&amp;nbsp; 10 0:30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that 10 0:30 is the average of (19d 9h 0m --&amp;gt; 20d 1h 0m / 2)=10d 0h 30m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice evening and c u tomorrow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Nov 2017 16:54:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-11-29T16:54:56Z</dc:date>
    <item>
      <title>Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396274#M423817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made a statistic with the performance of the assistant ticket, and I have these data:&lt;/P&gt;&lt;P&gt;1st ticket open 08/09/17 at 14:00 close 11/09/17 at 15:30 -&amp;gt; 2d 1h 30m&lt;/P&gt;&lt;P&gt;2nd ticket open 05/05/17 at 08:00 close 25/05/17 at 15:29 -&amp;gt; 17d 7h 30m&lt;/P&gt;&lt;P&gt;(I exclude only Sundays in my calculation)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Total duration time: 19d 9h 0m (right)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I need to calculate the average duration time and the AVG formula gives me (19d 9h 0m / 2)=9d 16h 30m, considering a day made up of 24 hours (right)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This result if wrong for me, because my working day is made up of 8 hours, so I have (19d 9h 0m --&amp;gt; 20d 1h 0m / 2)=10d 0h 30m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I calculate it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the attention.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 13:15:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396274#M423817</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-29T13:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396275#M423818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could calculate it in 3 steps (replace datetimes with fieldnames):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Whole days:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DAYSTART(11/09/17 at 15:30) - &lt;/SPAN&gt;DAYSTART(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;08/09/17 at 14:00)&amp;nbsp; - 1 = 2 days (9/9 and 10/9) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;2. Add partial days&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;First day&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;DATETIME(DAYSTART(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;08/09/17 at 14:00)+'17:00:00)) -&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DATETIME(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;08/09/17 at 14:00&lt;/SPAN&gt;) = 03:00:00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Last day&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DATETIME(11/09/17 at 15:30) - &lt;/SPAN&gt; DATETIME((&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DAYSTART(11/09/17 at 15:30)+'09:00:00)&amp;nbsp;&amp;nbsp; = 15.30 - 09:00 (assuming you'll start at 09:00 in the morning and make 8 hour days). = 6:30 &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;3. Calculate &amp;gt; 8 hours as a day &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;FLOOR((03:00:00 + 06:30:00)/08:00:00)&amp;nbsp; = 1&amp;nbsp; because 3+6:30&amp;nbsp; = 09:30 hours, s it is one day,. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Calculate the remaining hours: &lt;SPAN style="font-size: 13.3333px;"&gt;(03:00:00 + 06:30:00)-08:00:00&amp;nbsp; = 01:30:00&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thus 2 + FLOOR((03:00:00 + 06:30:00)/08:00:00) + &lt;SPAN style="font-size: 13.3333px;"&gt;(03:00:00 + 06:30:00)-08:00:00 = 3 days, and 1.5 hours. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;In expression it would be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DAYSTART(EndDate) - DAYSTART(StartDate)&amp;nbsp; - 1&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;FLOOR(((DAYSTART(StartDate)+'17:00:00') -&amp;nbsp; StartDate) + (EndDate - (DAYSTART(EndDate)+'09:00:00')) / '08:00:00')&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;((DAYSTART(StartDate)+'17:00:00') -&amp;nbsp; StartDate) + (EndDate - (DAYSTART(EndDate)+'09:00:00'))-'08:00:00' &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 13:39:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396275#M423818</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-29T13:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396276#M423819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The sundays aren't excluded btw. You could use the following script for that. I created a cross join (between the dates and a calendar). There I counted the sundays. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SourceTable:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;StartDate, EndDate&lt;/P&gt;&lt;P&gt;08-09-2017 14:00:00, 11-09-2017 15:30:00&lt;/P&gt;&lt;P&gt;05-05-2017 08:00:00, 25-05-2017 15:29:00&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Create calendar&lt;/P&gt;&lt;P&gt;FOR k = 2017 TO YEAR(TODAY())&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;DATE(DATE(DAYSTART(MAKEDATE($(k),1,1))) + RECNO()-1,'YYYY-MM-DD') AS Date&lt;/P&gt;&lt;P&gt;AUTOGENERATE((DATE(DAYSTART(YEAREND(MAKEDATE($(k),1,1))))-DATE(DAYSTART(MAKEDATE($(k),1,1))))+1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT k &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (Calendar) LOAD&lt;/P&gt;&lt;P&gt;StartDate,&lt;/P&gt;&lt;P&gt;EndDate&lt;/P&gt;&lt;P&gt;RESIDENT SourceTable;&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;/P&gt;&lt;P&gt;SundayCounter:&lt;/P&gt;&lt;P&gt;LEFT JOIN (SourceTable)&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt;SUM(IF(NUM(WEEKDAY(Date))=6,1,0)) AS Sundays,&lt;/P&gt;&lt;P&gt;StartDate,&lt;/P&gt;&lt;P&gt;EndDate&lt;/P&gt;&lt;P&gt;RESIDENT Calendar&lt;/P&gt;&lt;P&gt;WHERE Date &amp;gt; StartDate AND Date &amp;lt;= EndDate&lt;/P&gt;&lt;P&gt;GROUP BY StartDate,EndDate;&lt;/P&gt;&lt;P&gt;DROP TABLE Calendar;&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;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD&lt;/P&gt;&lt;P&gt;DAYSTART(EndDate) - DAYSTART(StartDate)&amp;nbsp; - 1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Sundays&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;FLOOR(((DAYSTART(StartDate)+'17:00:00') -&amp;nbsp; StartDate) + (EndDate - (DAYSTART(EndDate)+'09:00:00')) / '08:00:00')&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;((DAYSTART(StartDate)+'17:00:00') -&amp;nbsp; StartDate) + (EndDate - (DAYSTART(EndDate)+'09:00:00'))-'08:00:00' AS Time,&lt;/P&gt;&lt;P&gt;StartDate,&lt;/P&gt;&lt;P&gt;EndDate&lt;/P&gt;&lt;P&gt;RESIDENT SourceTable;&lt;/P&gt;&lt;P&gt;DROP TABLE SourceTable;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 14:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396276#M423819</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-29T14:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396277#M423820</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;thank you for the prompt response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't (and I don't want to) modify my single ticket calculated time, because it's the result of a complicated algorithm (not all day have the same work time, ecc, ecc), and it is like I need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is to average several days: let me to modify only a bit my question...&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- 1st ticket: 2d 1h 30m&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- 2nd ticket: 17d 7h 30m&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Total duration time: 19d 9h 0m (right)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Then I need to calculate the average duration time and the AVG formula gives me (19d 9h 0m / 2)=9d 16h 30m, considering a day made up of 24 hours (right)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;This result if wrong for me, because my working day is made up of 8 hours, so I have (19d 9h 0m --&amp;gt; 20d 1h 0m / 2)=10d 0h 30m.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it is much clear now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 15:17:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396277#M423820</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-29T15:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396278#M423821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got it. So I don't need to recalculte the whole time. Only correcting for the 8 hours.. You could use the last part of my calculation I would pressume. &lt;/P&gt;&lt;P&gt;19 days &lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;19d 9h 0m - 19 = 9 hours -&amp;gt; FLOOR(9 hours / 8 hours ) = 1 day &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;+ &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;9 hours - 8 hours = 1 hours&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;20 days + 1 hour&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So assume &lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;19d 9h 0m = [Time]&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FLOOR([Time]) +&amp;nbsp; FLOOR( ([Time] - FLOOR[Time] ) /'08:00:00') +&amp;nbsp; (&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;([Time] - FLOOR[Time] ) - '08:00:00')&lt;/EM&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 15:29:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396278#M423821</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-29T15:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396279#M423822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, forgive me if I'm stressing you &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've made a little example (I'm not able to create it with day and hours, so I created only with days, but it's good the same for the purpose...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the first calculated column I have the two partial duration time and the wrong (for my purpose) average; in the second column I tried to apply your suggestion, but the partial duration times are wrong and the average is right...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be sorry to have a look at it, pls?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 16:24:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396279#M423822</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-29T16:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396280#M423823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You aren't stressing my. No worries. English isn't my native language so maybe I'm not using the correct words or intonation. It is just the other way around. I have good fun in solving this question. &lt;/P&gt;&lt;P&gt;I'll look at your example and try to fix it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just updated your numbers if you don't mind to : &lt;/P&gt;&lt;P&gt;415:30:00 = 17 days, 7 hours and 30 minutes&lt;/P&gt;&lt;P&gt;49:30:00 = 2 days, 1 hour and 30 minutes. &lt;/P&gt;&lt;P&gt;Are those the correct numbers? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 16:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396280#M423823</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-29T16:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396281#M423824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, your numbers are correct (I don't know how you calculate them, but they are right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;); if you replace them in my inline instruction you'll find the right partial duration and the right (based on 24h) average in the second colums; vice versa in the third column (where I applied your suggestion) you'll find both the wrong partial duration and wrong the average one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls have a look to my attachment to see them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of all, I'd like to have one table with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TicketNr Duration&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 1:30&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17 7:30&lt;/P&gt;&lt;P&gt;-------------------------&lt;/P&gt;&lt;P&gt;Average&amp;nbsp; 10 0:30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that 10 0:30 is the average of (19d 9h 0m --&amp;gt; 20d 1h 0m / 2)=10d 0h 30m.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice evening and c u tomorrow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 16:54:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396281#M423824</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-29T16:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396282#M423825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that intervals are numbers shown in 24-hours format. With my calculation I corrected for 8 hours. For example 2 days 1:30 - 8 hours = 1 day 17:30. And because 17 &amp;lt; 24 it keeps showing 17 hours.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And that seems to be the problem. I don't think I solved anything, at least not in the direction of showing a 24 hours time format as an 8 hour format. I need to rethink this and maybe I will break your numbers apart (days, hours and minutes). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Right, your numbers are correct (I don't know how you calculate them, but they are right &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;2 days * 24 hours + 1,5 hours = 49:30:00&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; hours&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;17 days * 24 hours + 7,5 hours &lt;SPAN style="font-size: 13.3333px;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;415:30:00 hours&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 08:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396282#M423825</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-30T08:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396283#M423826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ok, pls consider that my partial durations are expressed in 8-hours day, so you can't find a number of hours &amp;gt; 8 (even if the format hh:mm allows it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Got the calculation for the LOAD INLINE instruction &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 08:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396283#M423826</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-30T08:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396284#M423827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've got it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I needed to cheat on the expression. so it basically is a text string (not a number!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEXT(CEIL(AVG(AGGR(SUM(FLOOR(Duration))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;IF(SUM(Duration - FLOOR(Duration))&amp;gt;'08:00:00',1,0)&lt;/P&gt;&lt;P&gt;,TicketNr))))&lt;/P&gt;&lt;P&gt;&amp;amp;' '&amp;amp;&lt;/P&gt;&lt;P&gt;TEXT(INTERVAL(SUM(Duration - FLOOR(Duration))- ('08:00:00'*IF(SUM(Duration - FLOOR(Duration))&amp;gt;'08:00:00',1,0)),'hh:mm'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TotalDays.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185225_TotalDays.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 09:30:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396284#M423827</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-30T09:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396285#M423828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Little update, because the hours weren't an average. I needed to add COUNT(TicketNr)&lt;/P&gt;&lt;P&gt;and i fixed the result being a text: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(CEIL(AVG(AGGR(SUM(FLOOR(Duration))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;IF(SUM(Duration - FLOOR(Duration))&amp;gt;'08:00:00',1,0)&lt;/P&gt;&lt;P&gt;,TicketNr))))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;((SUM(Duration - FLOOR(Duration))- ('08:00:00'*IF(SUM(Duration - FLOOR(Duration))&amp;gt;'08:00:00',1,0)))/COUNT(TicketNr))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 09:51:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396285#M423828</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-30T09:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396286#M423829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry but it doesn't work properly &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; and I'm not so skillful as you are to modify the expression on my own &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/cry.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls have a look at the example I've attached: the sum of the hours of the three tickets is 12 and so the average should be 4...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 09:57:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396286#M423829</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-30T09:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396287#M423830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicola,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The numbers in Durations (2).qvw add up to 28 hours. which is 1 day, so im getting an average of 9 hours and 20 minutes which is 1 days and 1 hour and 20 minutes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 10:08:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396287#M423830</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-30T10:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396288#M423831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, the problem is that my days are made-up by 8 hours (not 24), so I need that the average is&lt;/P&gt;&lt;P&gt;1d 1h 30m (thus 9h 30m) + 2h + 30m = 12h / 3 = 4 h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I fear that it's so easy to understand as hard to do &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 10:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396288#M423831</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-30T10:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396289#M423832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the average is &amp;gt; 8 hours then use my difficult calculation, otherewise just use the average. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I calculate the total average in a seperate dimension. It was to much trouble getting it in 1 expression. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 11:27:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396289#M423832</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2017-11-30T11:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Average with working days</title>
      <link>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396290#M423833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, thank you so much for all. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See you soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Dec 2017 08:07:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-with-working-days/m-p/1396290#M423833</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-01T08:07:24Z</dc:date>
    </item>
  </channel>
</rss>

