<?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: MAX() / AGGR() Questions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759098#M270109</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Jan 2015 06:31:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-09T06:31:56Z</dc:date>
    <item>
      <title>MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759092#M270103</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;&lt;/P&gt;&lt;P&gt;I have been struggling with this for a long time. Hope you guys can help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a mock up example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I have different sales agent in different division. Each sales agent has one manager. Agent could be Active or Inactive.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to calculate the maximum average sales per sales agent by division for active agents only in the last 12 months which is basically (Total Sales/Total Headcount)&lt;/P&gt;&lt;P&gt;And I also want the value to be unchanged when I make a selection on Managers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an expression like this:&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;MAX(&lt;/P&gt;&lt;P&gt;AGGR(&lt;/P&gt;&lt;P&gt;SUM( {$&amp;lt;[Agent Status] = {'Active'}, [Manager]=, [Quick Calendar] = {'LTM'}&amp;gt;} [Sales])&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;COUNT(DISTINCT {$&amp;lt;[Agent Status] = {'Active'}, [Manager] =, [Quick Calendar] = {'LTM'}&amp;gt;} [Agent Name])&lt;/P&gt;&lt;P&gt;,[Agent Division])&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine when I have no selection on Manager.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I make a selection on Manager, the value changes. I thought after I adding '[Manager]=,' in the set analysis would make the expression ignore selections on [Manager]. I cannot find any patterns when the number change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried changing '&amp;amp;' to '1' for the set analysis identifier but it doesn't work as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:11:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759092#M270103</guid>
      <dc:creator />
      <dc:date>2015-01-09T06:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759093#M270104</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 suspect that selecting manager is reducing the possible values in another field that is affecting your calculation - for example [Agent Division].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759093#M270104</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-01-09T06:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759094#M270105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your quick reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any suggestion for solving this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also does '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8000001907349px;"&gt;[Manager]=&lt;/SPAN&gt;' in set analysis ignore selections?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:18:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759094#M270105</guid>
      <dc:creator />
      <dc:date>2015-01-09T06:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759095#M270106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes&amp;nbsp; &lt;SPAN style="font-size: 12.8000001907349px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[Manager]= will ignore the selection.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759095#M270106</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2015-01-09T06:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759096#M270107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, Manager= will cause the manager selection to be ignored in the Sum()/Count() expressions.&lt;/P&gt;&lt;P&gt;To get suggested solutions, upload a sample of your model that shows the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:25:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759096#M270107</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-01-09T06:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759097#M270108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try including set analysis in the max() as well like:&lt;/P&gt;&lt;P&gt;Max({&amp;lt;Manager&amp;gt;} Aggr(....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, [Manager]=, ignores the selection, but that is only for the aggregarion fucntion it is within. If you select a manager, aggr and max still consider the selection and that would cause the value change.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759097#M270108</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-01-09T06:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759098#M270109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:31:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759098#M270109</guid>
      <dc:creator />
      <dc:date>2015-01-09T06:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759099#M270110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MAX(&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;AGGR&lt;/STRONG&gt;(&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SUM( {$&amp;lt;[Agent Status] = {'Active'}, [Manager]=, [Quick Calendar] = {'LTM'}&amp;gt;} [Sales])&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;,[Agent Division]&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;/&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Aggr&lt;/STRONG&gt;(COUNT(DISTINCT {$&amp;lt;[Agent Status] = {'Active'}, [Manager] =, [Quick Calendar] = {'LTM'}&amp;gt;} [Agent Name])&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,[Agent Division])&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;or&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MAX(&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;AGGR&lt;/STRONG&gt;(&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Avg( {$&amp;lt;[Agent Status] = {'Active'}, [Manager]=, [Quick Calendar] = {'LTM'}&amp;gt;} [Sales])&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;,[Agent Division]&lt;/SPAN&gt;)&lt;/P&gt;&lt;P style="font-size: 12.727272033691406px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:33:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759099#M270110</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2015-01-09T06:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: MAX() / AGGR() Questions</title>
      <link>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759100#M270111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tresesco:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works fine after adding '[Mananger] =' in the set analysis of MAX().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't know MAX() has set analysis before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 06:33:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/MAX-AGGR-Questions/m-p/759100#M270111</guid>
      <dc:creator />
      <dc:date>2015-01-09T06:33:33Z</dc:date>
    </item>
  </channel>
</rss>

