<?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 Group by Dimension based on Max Sales in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822805#M290032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a scenario where a customer can exist in multiple territories.&amp;nbsp; I want to show a list of customers where only the territory with the most sales are shown, but still have the total sales, independent of territory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example of data (other fields exist, such as month):&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="299" style="width: 256px; height: 251px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="86"&gt;Customer&lt;/TD&gt;&lt;TD class="xl64" width="31"&gt;Terr&lt;/TD&gt;&lt;TD class="xl63" width="51"&gt;Priority&lt;/TD&gt;&lt;TD class="xl63" width="39"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;Organization 1&lt;/TD&gt;&lt;TD&gt;1B2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="17"&gt;Organization 2&lt;/TD&gt;&lt;TD class="xl69"&gt;1B2&lt;/TD&gt;&lt;TD class="xl68"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;Organization 2&lt;/TD&gt;&lt;TD&gt;1B3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="17" style="border-top: none;"&gt;Organization 2&lt;/TD&gt;&lt;TD class="xl71"&gt;1B4&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none;"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17"&gt;Organization 3&lt;/TD&gt;&lt;TD&gt;2B1&lt;/TD&gt;&lt;TD class="xl67"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;Organization 3&lt;/TD&gt;&lt;TD&gt;2B3&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none;"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="17"&gt;Organization 4&lt;/TD&gt;&lt;TD class="xl69"&gt;2B3&lt;/TD&gt;&lt;TD class="xl72"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl72"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl74" height="17"&gt;Organization 5&lt;/TD&gt;&lt;TD class="xl75"&gt;2B4&lt;/TD&gt;&lt;TD class="xl74"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl74"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl73" height="17"&gt;Organization 6&lt;/TD&gt;&lt;TD class="xl71"&gt;2B4&lt;/TD&gt;&lt;TD class="xl73"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17"&gt;Organization 7&lt;/TD&gt;&lt;TD&gt;2B4&lt;/TD&gt;&lt;TD class="xl67"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;Organization 7&lt;/TD&gt;&lt;TD&gt;3B1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how I would like to show the data, preferably without changing the load script:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="199" style="width: 256px; height: 194px;" width="254"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="86"&gt;Customer&lt;/TD&gt;&lt;TD class="xl66" width="31"&gt;Terr&lt;/TD&gt;&lt;TD class="xl65" width="51"&gt;Priority&lt;/TD&gt;&lt;TD class="xl65" width="39"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 1&lt;/TD&gt;&lt;TD&gt;1B2&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 2&lt;/TD&gt;&lt;TD&gt;1B4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 3&lt;/TD&gt;&lt;TD&gt;2B3&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 4&lt;/TD&gt;&lt;TD&gt;2B3&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 5&lt;/TD&gt;&lt;TD&gt;2B4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 6&lt;/TD&gt;&lt;TD&gt;2B4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 7&lt;/TD&gt;&lt;TD&gt;2B4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I build the Territory dimension to accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help that you can provide!&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Nov 2014 20:30:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-11-12T20:30:36Z</dc:date>
    <item>
      <title>Group by Dimension based on Max Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822805#M290032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a scenario where a customer can exist in multiple territories.&amp;nbsp; I want to show a list of customers where only the territory with the most sales are shown, but still have the total sales, independent of territory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example of data (other fields exist, such as month):&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="299" style="width: 256px; height: 251px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="17" width="86"&gt;Customer&lt;/TD&gt;&lt;TD class="xl64" width="31"&gt;Terr&lt;/TD&gt;&lt;TD class="xl63" width="51"&gt;Priority&lt;/TD&gt;&lt;TD class="xl63" width="39"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;Organization 1&lt;/TD&gt;&lt;TD&gt;1B2&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl68" height="17"&gt;Organization 2&lt;/TD&gt;&lt;TD class="xl69"&gt;1B2&lt;/TD&gt;&lt;TD class="xl68"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl68"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;Organization 2&lt;/TD&gt;&lt;TD&gt;1B3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl70" height="17" style="border-top: none;"&gt;Organization 2&lt;/TD&gt;&lt;TD class="xl71"&gt;1B4&lt;/TD&gt;&lt;TD class="xl70" style="border-top: none;"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl70" style="border-top: none;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17"&gt;Organization 3&lt;/TD&gt;&lt;TD&gt;2B1&lt;/TD&gt;&lt;TD class="xl67"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="17" style="border-top: none;"&gt;Organization 3&lt;/TD&gt;&lt;TD&gt;2B3&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none;"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl66" style="border-top: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl72" height="17"&gt;Organization 4&lt;/TD&gt;&lt;TD class="xl69"&gt;2B3&lt;/TD&gt;&lt;TD class="xl72"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl72"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl74" height="17"&gt;Organization 5&lt;/TD&gt;&lt;TD class="xl75"&gt;2B4&lt;/TD&gt;&lt;TD class="xl74"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl74"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl73" height="17"&gt;Organization 6&lt;/TD&gt;&lt;TD class="xl71"&gt;2B4&lt;/TD&gt;&lt;TD class="xl73"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl73"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17"&gt;Organization 7&lt;/TD&gt;&lt;TD&gt;2B4&lt;/TD&gt;&lt;TD class="xl67"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl67"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" style="border-top: none;"&gt;Organization 7&lt;/TD&gt;&lt;TD&gt;3B1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl65" style="border-top: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how I would like to show the data, preferably without changing the load script:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="199" style="width: 256px; height: 194px;" width="254"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="17" width="86"&gt;Customer&lt;/TD&gt;&lt;TD class="xl66" width="31"&gt;Terr&lt;/TD&gt;&lt;TD class="xl65" width="51"&gt;Priority&lt;/TD&gt;&lt;TD class="xl65" width="39"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 1&lt;/TD&gt;&lt;TD&gt;1B2&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 2&lt;/TD&gt;&lt;TD&gt;1B4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 3&lt;/TD&gt;&lt;TD&gt;2B3&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 4&lt;/TD&gt;&lt;TD&gt;2B3&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 5&lt;/TD&gt;&lt;TD&gt;2B4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;Medium&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 6&lt;/TD&gt;&lt;TD&gt;2B4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;Low&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="17" style="border-top: none;"&gt;Organization 7&lt;/TD&gt;&lt;TD&gt;2B4&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none;"&gt;High&lt;/TD&gt;&lt;TD align="right" class="xl67" style="border-top: none;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I build the Territory dimension to accomplish this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help that you can provide!&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 20:30:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822805#M290032</guid>
      <dc:creator />
      <dc:date>2014-11-12T20:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Group by Dimension based on Max Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822806#M290033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;List Territory as an Expression, using the function FirstSortedValue, with the amount of Sales as the sorting parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 23:15:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822806#M290033</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2014-11-12T23:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Group by Dimension based on Max Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822807#M290034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just tried this and although the formula validates, I cannot get it to return the correct results.&amp;nbsp; Here is my formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue([Terr], (-aggr(sum( { &amp;lt; [Month]=, [Month Rank] = {1,2,3},&amp;nbsp; [Brand]= {'BRANDA'} &amp;gt;}&amp;nbsp; [Sales]), [Customer])))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea what I am doing wrong?&amp;nbsp; My understanding is that adding the minus sign before the aggr function will change it to the last sorted value (Largest sales number).&amp;nbsp; I can't see any specific logic to how the Terr is selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 00:48:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822807#M290034</guid>
      <dc:creator />
      <dc:date>2014-11-13T00:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Group by Dimension based on Max Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822808#M290035</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;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: Customer&lt;/P&gt;&lt;P&gt;Expression 1 (Terr):&amp;nbsp; FirstSortedValue(Terr,-aggr(Sum(Sales),Customer,Terr))&lt;/P&gt;&lt;P&gt;Expression 2 (Priority) : FirstSortedValue(Priority,-aggr(Sum(Sales),Customer,Terr))&lt;/P&gt;&lt;P&gt;Expression 3 (Sales): Sum(Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 15:51:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822808#M290035</guid>
      <dc:creator />
      <dc:date>2014-11-13T15:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Group by Dimension based on Max Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822809#M290036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very helpful Francisco!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Last thing.&amp;nbsp; I have one example where the sales are the same for an account in each territory.&amp;nbsp; It returns null and I am fine with it showing either territory.&amp;nbsp; How can I have it populate with a territory?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 18:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822809#M290036</guid>
      <dc:creator />
      <dc:date>2014-11-13T18:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Group by Dimension based on Max Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822810#M290037</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 think that using distinct you can solve the problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue(distinct Terr,-aggr(Sum(Sales),Customer,Terr))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp; function (FirstSortedValue) has a parameter for this case (n as order), but i've tried apply it &lt;SPAN class="hps"&gt;unsuccessfully...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Nov 2014 07:59:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822810#M290037</guid>
      <dc:creator />
      <dc:date>2014-11-14T07:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Group by Dimension based on Max Sales</title>
      <link>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822811#M290038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect.&amp;nbsp; Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Nov 2014 19:17:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Group-by-Dimension-based-on-Max-Sales/m-p/822811#M290038</guid>
      <dc:creator />
      <dc:date>2014-11-19T19:17:31Z</dc:date>
    </item>
  </channel>
</rss>

