<?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: Problem with interval and aggr function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272547#M856086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample where you are trying this and also share the number you are expecting to see based on the sample you provide?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Feb 2017 12:37:02 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-02-01T12:37:02Z</dc:date>
    <item>
      <title>Problem with interval and aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272546#M856085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a problem using interval and aggr function together.&lt;/P&gt;&lt;P&gt;I calculated the "handling time" in this table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="pick.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/151577_pick.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;using interval function :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTERVAL(only({..setanalysis..}DATE)&lt;/P&gt;&lt;P&gt;-only({&lt;SPAN style="font-size: 13.3333px;"&gt;.setanalysis.&lt;/SPAN&gt;&amp;gt;}DATE),'mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it works.&lt;/P&gt;&lt;P&gt;Now I want to represent the AVG Handling time (186 in the previous table) in a text box.&lt;/P&gt;&lt;P&gt;I used this formula:&lt;/P&gt;&lt;P&gt;avg( aggr(INTERVAL(only({&lt;SPAN style="font-size: 13.3333px;"&gt;..setanalysis..&lt;/SPAN&gt;&amp;gt;}DATE)&lt;/P&gt;&lt;P&gt;-only({&lt;SPAN style="font-size: 13.3333px;"&gt;..setanalysis..&lt;/SPAN&gt;} DATE),'mm'),CAMPAIGN_MEMBER_ID)) but I obtain a result completely different from 186.. like 0,125.. Anyone could explain me how can I obtain the right result and what am i missing??&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eva&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/Problem-with-interval-and-aggr-function/m-p/1272546#M856085</guid>
      <dc:creator>19iv1987</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with interval and aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272547#M856086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample where you are trying this and also share the number you are expecting to see based on the sample you provide?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 12:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272547#M856086</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-02-01T12:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with interval and aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272548#M856087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to set the format-function on the outside like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTERVAL(avg( aggr(only({&lt;SPAN style="font-size: 13.3333px;"&gt;..setanalysis..&lt;/SPAN&gt;&amp;gt;}DATE)&lt;/P&gt;&lt;P&gt;-only({&lt;SPAN style="font-size: 13.3333px;"&gt;..setanalysis..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;} DATE),CAMPAIGN_MEMBER_ID)),'mm')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 12:53:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272548#M856087</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-02-01T12:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with interval and aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272549#M856088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny.&lt;/P&gt;&lt;P&gt;Here a demo to better explain the situation.&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eva &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 13:33:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272549#M856088</guid>
      <dc:creator>19iv1987</dc:creator>
      <dc:date>2017-02-01T13:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with interval and aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272550#M856089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Marcus it works!But I didn't uderstand how it's possibile,... can u explain me why my previous solution didn't work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 13:37:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272550#M856089</guid>
      <dc:creator>19iv1987</dc:creator>
      <dc:date>2017-02-01T13:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with interval and aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272551#M856090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Each time is only a part from a day so that for example 1 hour = 1/24 = 0,0416666666666667 which is the real value and something like 01:00:00 is only a string-representation respectively a formatting. Further each calculation with a formatted date/time returned only a pure numeric representation - this meant the formatting must be on the outside of the value/calculation if you want to show it with any date/time-formatting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 13:47:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272551#M856090</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-02-01T13:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with interval and aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272552#M856091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another option - if you want to use the minutes in further calculation as number - would be to transform the intervals represented as fraction of days into intervals represented as minutes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=avg(aggr(&lt;/P&gt;&lt;P&gt;(only({&amp;lt;RANK={2}&amp;gt;}DATE)-only({&amp;lt;RANK={1}&amp;gt;}DATE))&lt;STRONG&gt;*24*60&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;,Members))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit:&lt;/P&gt;&lt;P&gt;Or just applied to the average value &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;=avg(aggr(&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;(only({&amp;lt;RANK={2}&amp;gt;}DATE)-only({&amp;lt;RANK={1}&amp;gt;}DATE))&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;,Members))&amp;nbsp; *24*60 // transform fraction of days into minutes by multiplying with number of minutes per day&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 14:17:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-interval-and-aggr-function/m-p/1272552#M856091</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-02-01T14:17:16Z</dc:date>
    </item>
  </channel>
</rss>

