<?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: Set Analysis Using Interval(), Avg() and Max() in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879067#M306875</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Writing your function using set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Interval(now()-DATE(MAX({&amp;lt;ReportingDate={'&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)'},INCIDENTS_Open_State_Flag={1},INCIDENTS_Incident_Flag={1} ReportingDateTime), 'YYYY-MM-DD, HH:MM:SS'), 'hh:mm')&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;How to take the average of your function per ticket:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;avg(aggr(Interval(now()-DATE(MAX({&amp;lt;ReportingDate={'&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)'},INCIDENTS_Open_State_Flag={1},INCIDENTS_Incident_Flag={1} ReportingDateTime), 'YYYY-MM-DD, HH:MM:SS'), 'hh:mm'),TicketID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2015 16:22:00 GMT</pubDate>
    <dc:creator>Nicole-Smith</dc:creator>
    <dc:date>2015-07-15T16:22:00Z</dc:date>
    <item>
      <title>Set Analysis Using Interval(), Avg() and Max()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879066#M306874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to find the average time between the last time open tickets were updated and now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have this working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Interval(now()-&lt;/P&gt;&lt;P&gt;DATE(MAX(IF(ReportingDate &amp;gt;=(vStartDate) &lt;/P&gt;&lt;P&gt;AND ReportingDate &amp;lt;= (vEndDate)&lt;/P&gt;&lt;P&gt;AND INCIDENTS_Open_State_Flag=1 &lt;/P&gt;&lt;P&gt;AND INCIDENTS_Incident_Flag=1,&lt;/P&gt;&lt;P&gt;ReportingDateTime, 'YYYY-MM-DD, HH:MM:SS'))), 'hh:mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What this is doing at the moment is simply selecting the most recent update datetime across all support tickets and working out the difference between that and now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like to do is calculate the above but grab the most recent update datetime per ticket and then average it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried and tried but cannot get this to work, any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I'm relatively new to Qlik coding so am totally confused by how to achieve this with set analysis)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 13:22:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879066#M306874</guid>
      <dc:creator />
      <dc:date>2015-07-15T13:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Using Interval(), Avg() and Max()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879067#M306875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Writing your function using set analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Interval(now()-DATE(MAX({&amp;lt;ReportingDate={'&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)'},INCIDENTS_Open_State_Flag={1},INCIDENTS_Incident_Flag={1} ReportingDateTime), 'YYYY-MM-DD, HH:MM:SS'), 'hh:mm')&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;How to take the average of your function per ticket:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;avg(aggr(Interval(now()-DATE(MAX({&amp;lt;ReportingDate={'&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)'},INCIDENTS_Open_State_Flag={1},INCIDENTS_Incident_Flag={1} ReportingDateTime), 'YYYY-MM-DD, HH:MM:SS'), 'hh:mm'),TicketID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 16:22:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879067#M306875</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2015-07-15T16:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Using Interval(), Avg() and Max()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879068#M306876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicole,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try and use your avg(aggr function for my headline bubble it simply outputs '-'&amp;nbsp; (doesn't error though).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try to to use your one without the average as a column in a table of mine to test the set theory I get 'Error in set modifier expression'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 07:35:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879068#M306876</guid>
      <dc:creator />
      <dc:date>2015-07-16T07:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Using Interval(), Avg() and Max()</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879069#M306877</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a sample QVW?&amp;nbsp; I will be able to troubleshoot if I'm able to see what you're working with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jul 2015 01:06:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Using-Interval-Avg-and-Max/m-p/879069#M306877</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2015-07-19T01:06:26Z</dc:date>
    </item>
  </channel>
</rss>

