<?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: Sum with Max Function throwing Error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518486#M193618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;interval() function i believe it calculates the datediff between two dates.&lt;/P&gt;&lt;P&gt;and i am using the above expression in a chart(table) with no dimensions)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Oct 2013 10:07:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-24T10:07:43Z</dc:date>
    <item>
      <title>Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518484#M193616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am stuck with an expression: &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;My reqmnt:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I calculated the datediff between two dates for an user: Interval(Max(RespondTime)-JoinDt,'d')&lt;/P&gt;&lt;P&gt;I want to calculate the average date diff for all users:&lt;/P&gt;&lt;P&gt;When i try something like this its throwing an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;sum( Interval(Max(RespondTime)-JoinDt,'d'))/Count(UserId)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 09:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518484#M193616</guid>
      <dc:creator />
      <dc:date>2013-10-24T09:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518485#M193617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interval() is just a formatting function, I believe.&amp;nbsp; Also, the expression you need will vary depending if it is in a chart or not and what the dimensions are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What exactly are you trying to achieve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 10:00:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518485#M193617</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-10-24T10:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518486#M193618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;interval() function i believe it calculates the datediff between two dates.&lt;/P&gt;&lt;P&gt;and i am using the above expression in a chart(table) with no dimensions)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 10:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518486#M193618</guid>
      <dc:creator />
      <dc:date>2013-10-24T10:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518487#M193619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No dimensions?&amp;nbsp; So you just want a single number returned that is the average of Max(RespondTime)-JoinDt, across all users? Max(RespondTime) is no the global Max() but a per-user Max()?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I this is your requirement then you will need to use Aggr().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you want to achieve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 10:11:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518487#M193619</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-10-24T10:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518488#M193620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I think JoinDt is a dimension and having multiple values.&amp;nbsp; If so, try getting the single value by using max() or min().&amp;nbsp; That's why you are getting an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible attach a sample file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 10:14:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518488#M193620</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-10-24T10:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518489#M193621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Exactly Jason.&lt;/P&gt;&lt;P&gt;Can you please send me the expression with Aggr fucntion.I tried but its not wrkn.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 10:16:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518489#M193621</guid>
      <dc:creator />
      <dc:date>2013-10-24T10:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518490#M193622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(Aggr((Max(RespondTime)-JoinDt),UserID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 10:26:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518490#M193622</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-10-24T10:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518491#M193623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;And put it in a text object rather than a chart.&amp;nbsp; Oh, and you can wrap it in Interval() I think to get it formatted in minutes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interval(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;Avg(Aggr((Max(RespondTime)-JoinDt),UserID))&lt;/SPAN&gt;)&lt;/P&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;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 10:28:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518491#M193623</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2013-10-24T10:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sum with Max Function throwing Error</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518492#M193624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jason !! It worked!! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 11:50:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-with-Max-Function-throwing-Error/m-p/518492#M193624</guid>
      <dc:creator />
      <dc:date>2013-10-24T11:50:39Z</dc:date>
    </item>
  </channel>
</rss>

