<?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: Calculate the time Avg in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28562#M768364</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;Based on your data, I would do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD Received,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Replied,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Received - Date#(Mid(Replied, 6, 20), 'DD MMMM YYYY hh:mm:ss') As Diff&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Time avg.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And create this expression &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;on a text object ...&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;=Interval(Avg(Diff), 'DD hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get the average difference in days and hours, or ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Interval(Avg(Diff), 'hh:mm:ss')&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;to get it just in hours, minutes and seconds.&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;But, be careful! Some of your records are not well formatted, as this one ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"24 May 2018 12:02:50 +0100" (note the lack of the first 3 letters at the beginning!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...on the 303th row of your Excel spreadsheet. This will not be taken into consideration on the avarege calculation, as the "Diff" will be null on this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2018 19:07:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-06-14T19:07:57Z</dc:date>
    <item>
      <title>Calculate the time Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28560#M768362</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;I have two fields Received and Replied As bellow. Now i need the average of time difference in text object.&lt;/P&gt;&lt;P&gt;Ex:- avg(Replied-Received).&lt;/P&gt;&lt;P&gt;And the origenal data is attached bellow please help me out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="216" style="width: 500px; height: 186px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="101"&gt;Received&lt;/TD&gt;&lt;TD class="xl63" width="64"&gt;Replied&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;5/20/2018 8:00&lt;/TD&gt;&lt;TD class="xl63"&gt;Sun, 20 May 2018 06:59:29 +0000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;5/20/2018 9:50&lt;/TD&gt;&lt;TD class="xl63"&gt;Sun, 20 May 2018 04:48:19 -0400 (EDT)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;5/20/2018 10:20&lt;/TD&gt;&lt;TD class="xl63"&gt;Sun, 20 May 2018 09:17:34 +0000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;5/20/2018 10:50&lt;/TD&gt;&lt;TD class="xl63"&gt;Sun, 20 May 2018 09:48:09 +0000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;5/20/2018 11:10&lt;/TD&gt;&lt;TD class="xl63"&gt;Sun, 20 May 2018 11:08:29 +0100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;5/20/2018 12:20&lt;/TD&gt;&lt;TD class="xl63"&gt;Sun, 20 May 2018 12:17:56 +0100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;5/20/2018 14:00&lt;/TD&gt;&lt;TD class="xl63"&gt;Sun, 20 May 2018 13:55:10 +0100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20"&gt;5/20/2018 14:00&lt;/TD&gt;&lt;TD class="xl63"&gt;Sun, 20 May 2018 13:56:01 +0100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28560#M768362</guid>
      <dc:creator>vinod22kv</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the time Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28561#M768363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not calculate the Time Diff in script:&lt;/P&gt;&lt;P&gt;rangesum(-Received,Replied) as TimeDiff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use the expression: avg(TimeDiff)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 16:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28561#M768363</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2018-06-14T16:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the time Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28562#M768364</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;Based on your data, I would do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;LOAD Received,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Replied,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Received - Date#(Mid(Replied, 6, 20), 'DD MMMM YYYY hh:mm:ss') As Diff&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Time avg.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And create this expression &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;on a text object ...&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;=Interval(Avg(Diff), 'DD hh:mm:ss')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to get the average difference in days and hours, or ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Interval(Avg(Diff), 'hh:mm:ss')&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;to get it just in hours, minutes and seconds.&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;But, be careful! Some of your records are not well formatted, as this one ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"24 May 2018 12:02:50 +0100" (note the lack of the first 3 letters at the beginning!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...on the 303th row of your Excel spreadsheet. This will not be taken into consideration on the avarege calculation, as the "Diff" will be null on this case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 19:07:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28562#M768364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-14T19:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the time Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28563#M768365</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;maybe another solution could be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_304920_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/205236_QlikCommunity_Thread_304920_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15290084547182090 jive_text_macro" jivemacro_uid="_15290084547182090"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD *,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Interval(Received-Replied,'d hh:mm:ss') as TimeDiff;&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Received, &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Replied as RepliedTxt,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp(ConvertToLocalTime(Timestamp#(Mid(Replied,6,20),'DD MMM YYYY hh:mm:ss'),'GMT'&amp;amp;Mid(Replied,FindOneOf(Replied,'+-'),3)&amp;amp;':'&amp;amp;Mid(Replied,FindOneOf(Replied,'+-')+3,2),1),'MM/DD/YYYY hh:mm:ss') as Replied,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mid(Replied,FindOneOf(Replied,'+-'),5) as TimeZone&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A class="" data-containerid="-1" data-containertype="-1" data-objectid="328732" data-objecttype="13" href="https://community.qlik.com/servlet/JiveServlet/download/2003-304920-1502299-328732/Time+avg.xlsx"&gt;https://community.qlik.com/servlet/JiveServlet/download/1502299-328732/Time%20avg.xlsx&lt;/A&gt;&lt;SPAN&gt;] (ooxml, embedded labels, table is Sheet1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&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;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2018 20:34:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28563#M768365</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2018-06-14T20:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the time Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28564#M768366</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;Thans a lot for your help.&lt;/P&gt;&lt;P&gt;i have notised time difference between replied and repliedtxt fields, both ar same fields but showing different values. can you please check that one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 11:07:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28564#M768366</guid>
      <dc:creator>vinod22kv</dc:creator>
      <dc:date>2018-06-15T11:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the time Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28565#M768367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i am checking the difference manuvealy it is showing wrong data for an example record no 679 received date is&lt;/P&gt;&lt;P&gt;15 may 2018 13:25:52 and replied date is 26/05/2018 1:25:56 pm. then the difference is showing only 00:00:04. this is wrong this is not considering the days. Can you please help me out??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 11:51:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28565#M768367</guid>
      <dc:creator>vinod22kv</dc:creator>
      <dc:date>2018-06-15T11:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the time Avg</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28566#M768368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried to apply the time zone information included in your timestamps as well using the ConvertToLocalTime() function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 20:30:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-time-Avg/m-p/28566#M768368</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2018-06-15T20:30:17Z</dc:date>
    </item>
  </channel>
</rss>

