<?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 from specific field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382329#M491101</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks yet again Stefan.&amp;nbsp; Sorry for the delay in getting back, I was testing it on my excel spreadsheet, and forgot that excel doesnt seem to like anything that goes over 24 hours.&amp;nbsp; &lt;/P&gt;&lt;P&gt;It has worked perfectly though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Aug 2012 13:57:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-30T13:57:05Z</dc:date>
    <item>
      <title>Average from specific field</title>
      <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382323#M491095</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 to Stefan and Rob, I have added in a new Dimension into my straight chart and called it Duration.&amp;nbsp; The &lt;STRONG&gt;Duration &lt;/STRONG&gt;field contains the following expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Interval(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&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;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above expression basically takes the closedate from the logdate and then only calculates hours between 08:00 - 18:00 on a weekday.&amp;nbsp; &lt;/P&gt;&lt;P&gt;As I have added this into my straight_table dimension, it pulls through what I want onto the straight_table.&amp;nbsp; However what I want to do is place a text box underneath the straight_table that calculates the average of this Duration Field (which is only created in the straight_table), depending on a set of values that I selected.&amp;nbsp; Therefore I may select 3 values with a duration of 01:00:00, 02:00:00, 03:00:00, and in the text field I want it to show the average time as 02:00:00.&lt;/P&gt;&lt;P&gt;Is it possible to calculate and average if the new Duration field was only created in a straight chart?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 11:20:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382323#M491095</guid>
      <dc:creator />
      <dc:date>2012-08-30T11:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Average from specific field</title>
      <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382324#M491096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I think you need to replicate this calculation and add an avg() function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=Interval(&lt;STRONG&gt;avg(&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RangeMin(frac(DT2), MakeTime(18))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - RangeMax(frac(DT1), MakeTime(8)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + (NetWorkDays(DT1, DT2-1) * MakeTime(10)) // Only 10 hours per whole day&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression will regard your selections, so if you select three records, you will get the avg of those three records.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 11:28:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382324#M491096</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-30T11:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Average from specific field</title>
      <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382325#M491097</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;Thanks for the expression.&amp;nbsp; It works when I select manually, however if I select a month of data (eg: All date for August 2012, it shows a negative figure.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 11:39:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382325#M491097</guid>
      <dc:creator />
      <dc:date>2012-08-30T11:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Average from specific field</title>
      <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382326#M491098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you upload a small sample? Or modify one of the previous samples to match your setting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 11:44:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382326#M491098</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-30T11:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Average from specific field</title>
      <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382327#M491099</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;I have attached a copy of the qvd file.&amp;nbsp; At the bottom of the Straight_Chart labelled All Close calls for Business Systems Team, there are two text objects, it is the one next to AVERAGE =.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 11:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382327#M491099</guid>
      <dc:creator />
      <dc:date>2012-08-30T11:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Average from specific field</title>
      <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382328#M491100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the order of dates in networkdays() function in the text object expression is incorrect, it should look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Interval(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;avg(&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&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;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&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;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&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;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 12:04:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382328#M491100</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-30T12:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Average from specific field</title>
      <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382329#M491101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks yet again Stefan.&amp;nbsp; Sorry for the delay in getting back, I was testing it on my excel spreadsheet, and forgot that excel doesnt seem to like anything that goes over 24 hours.&amp;nbsp; &lt;/P&gt;&lt;P&gt;It has worked perfectly though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 13:57:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382329#M491101</guid>
      <dc:creator />
      <dc:date>2012-08-30T13:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: Average from specific field</title>
      <link>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382330#M491102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To get intervals correctly displayed in Excel, use a user defined format like&lt;/P&gt;&lt;P&gt;&lt;H&gt;:mm:ss&lt;/H&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 14:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-from-specific-field/m-p/382330#M491102</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-08-30T14:04:46Z</dc:date>
    </item>
  </channel>
</rss>

