<?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 Rank or Aggr in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177529#M45101</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot HD for your poste, this solution work i can now display the company, But i have lost the total sum(TO), now i have only SUM(TO) of the best company?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Nov 2010 14:39:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-09T14:39:36Z</dc:date>
    <item>
      <title>Rank or Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177527#M45099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have this pivot table, which i use to calculate the total sum of turn over by product :&lt;/P&gt;&lt;P&gt;Product; Sum(TO)&lt;BR /&gt;P1; 42&lt;BR /&gt;The sum(TO) is given by add the (TO) of all companies.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;For P1:&lt;BR /&gt;Sum(TO) = Sum(TO)(of company1) + Sum(TO)( of company2) + Sum(TO)(of company3)&lt;BR /&gt;&lt;BR /&gt;With:&lt;BR /&gt;Sum(TO)(company1)= 12&lt;BR /&gt;&lt;BR /&gt;Sum(TO)(company2)=20&lt;BR /&gt;&lt;BR /&gt;Sum(TO)(company3)=10.&lt;BR /&gt;&lt;BR /&gt;I want now, to display the company with the best "Best TO", in may example : company2. And my new pivot table will look like:&lt;/P&gt;&lt;P&gt;'Product'; S'um (TO)';' Best TO company'&lt;BR /&gt;P1; 42; 'company2'&lt;BR /&gt;&lt;BR /&gt;I can find the best max (TO) with : max(aggr(sum([T/O]),Company)) but i didnt fin a way to display the name of the company!&lt;/P&gt;&lt;P&gt;Any one has made such application then please do forward it to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 10:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177527#M45099</guid>
      <dc:creator />
      <dc:date>2010-11-09T10:07:00Z</dc:date>
    </item>
    <item>
      <title>Rank or Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177528#M45100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Perhaps both Aggr and Rank together will work - I've a related problem and have just been reading a similar post on getting max city names by population,&lt;/P&gt;&lt;P&gt;see http://community.qlik.com/forums/t/33417.aspx&lt;/P&gt;&lt;P&gt;So try something like the following;&lt;/P&gt;&lt;P&gt;1) Create a calculated dimension and suppress null values, label 'Best TO Company'&lt;/P&gt;&lt;P&gt;2) set expression = aggr( IF ( Rank(max(aggr(sum([T/O]),"Company")),1,1)=1,"Company"),"Company)"&lt;/P&gt;&lt;P&gt;This works on my solution but seems a bit complex - maybe someone else has a simpler solution,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;HD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 12:44:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177528#M45100</guid>
      <dc:creator>hdonald</dc:creator>
      <dc:date>2010-11-09T12:44:34Z</dc:date>
    </item>
    <item>
      <title>Rank or Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177529#M45101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot HD for your poste, this solution work i can now display the company, But i have lost the total sum(TO), now i have only SUM(TO) of the best company?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 14:39:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177529#M45101</guid>
      <dc:creator />
      <dc:date>2010-11-09T14:39:36Z</dc:date>
    </item>
    <item>
      <title>Rank or Aggr</title>
      <link>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177530#M45102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I moved the formula from calculate dimension to expression and all work now, thanks HD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Nov 2010 14:44:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Rank-or-Aggr/m-p/177530#M45102</guid>
      <dc:creator />
      <dc:date>2010-11-09T14:44:28Z</dc:date>
    </item>
  </channel>
</rss>

