<?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 Min and max with aggregation and sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241354#M91779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;Thank you for your effort. Unfortunately both of the expressions doesn't work. Second one doesn't show any of the results, while the first one shows the correct name, in the case where there is only one account (one customer). I think there has to be some solution for that, as far as QV is able to recognize correct min (so knows min customer), it should be able also to show it's name. Anyway, thank you very much for your help!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Beata&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Oct 2010 18:11:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-10-19T18:11:56Z</dc:date>
    <item>
      <title>Min and max with aggregation and sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241350#M91775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all QV users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a following problem. I would like to show in a table like that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-2614_sourceID:2614" /&gt;&lt;/P&gt;&lt;P&gt;the value of the lowest/ highest sales and the average of all sales (sum of sales). For example you can see that there are 9 customers tagged as a Blenders. Among them I would like to find a customer with the lowest sum of sales and the highest sum of sales (preferably showing the value &amp;amp; the name of the customer). I tried few agg and sum functions and unfortunatley I am totally stacked. I would appreciate your help.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Beata&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 16:02:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241350#M91775</guid>
      <dc:creator />
      <dc:date>2010-10-19T16:02:23Z</dc:date>
    </item>
    <item>
      <title>Min and max with aggregation and sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241351#M91776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your Total Volume something like Sum(Sales)? What is the name of the Core field?&lt;/P&gt;&lt;P&gt;You need an Aggr(), so it would be something like:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Min(Aggr(Sum(Sales), CustomerPri, CustomerType, Account)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Your Aggr() needs all the dimensions to group by, in this case, you want to stay within CustomerPri and CustomerType and find the Account with the lowest value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 16:13:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241351#M91776</guid>
      <dc:creator />
      <dc:date>2010-10-19T16:13:41Z</dc:date>
    </item>
    <item>
      <title>Min and max with aggregation and sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241352#M91777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works great!!! I tried with Min(Aggr(Sum(Sales), CustomerPriority, CustomerType) earlier but I was missing '&lt;I&gt;Account&lt;/I&gt;', what is just the CutsomerName in my data. Is there any chance to see the name of the lowest sum of sales?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much,&lt;/P&gt;&lt;P&gt;Beata&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 16:36:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241352#M91777</guid>
      <dc:creator />
      <dc:date>2010-10-19T16:36:34Z</dc:date>
    </item>
    <item>
      <title>Min and max with aggregation and sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241353#M91778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, as I was typing up my response, I forgot the Account at first. I remembered just before hitting Post. &lt;IMG alt="Big Smile" src="http://community.qlik.com/emoticons/emotion-2.gif" /&gt;&lt;/P&gt;&lt;P&gt;The name of that account may be a little more difficult, because the Sales per Customer is probably an expression (not a field), which makes it hard to use in Set Analysis. Maybe:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;If(Aggr(Sum(Sales), CustomerPriority, CustomerType, Account) =&lt;BR /&gt;Min(Aggr(Sum(Sales), CustomerPriority, CustomerType, Account)), Customer)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm not sure if that's going to work though. This may be a case where some sample data is needed, because Aggr() can be a little tricky and is very dependent on the structure of the dataset.&lt;/P&gt;&lt;P&gt;EDIT: Maybe also try:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Concat(If(Aggr(Sum(Sales), CustomerPriority, CustomerType, Account) =&lt;BR /&gt;Min(Aggr(Sum(Sales), CustomerPriority, CustomerType, Account)), Customer))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;That may be needed, because you could possibly return multiple. &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 17:46:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241353#M91778</guid>
      <dc:creator />
      <dc:date>2010-10-19T17:46:50Z</dc:date>
    </item>
    <item>
      <title>Min and max with aggregation and sum</title>
      <link>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241354#M91779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hallo,&lt;/P&gt;&lt;P&gt;Thank you for your effort. Unfortunately both of the expressions doesn't work. Second one doesn't show any of the results, while the first one shows the correct name, in the case where there is only one account (one customer). I think there has to be some solution for that, as far as QV is able to recognize correct min (so knows min customer), it should be able also to show it's name. Anyway, thank you very much for your help!&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Beata&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 18:11:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Min-and-max-with-aggregation-and-sum/m-p/241354#M91779</guid>
      <dc:creator />
      <dc:date>2010-10-19T18:11:56Z</dc:date>
    </item>
  </channel>
</rss>

