<?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: Top 10 and Worst 10 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596902#M221070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try by adding the minus sign in front of the sum function like this :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({&amp;lt;CustomerID = {"=Rank(-sum(ActualSales))&amp;lt;=10"}&amp;gt;}ActualSales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Apr 2014 19:39:20 GMT</pubDate>
    <dc:creator>mambi</dc:creator>
    <dc:date>2014-04-19T19:39:20Z</dc:date>
    <item>
      <title>Top 10 and Worst 10</title>
      <link>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596901#M221069</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 a table like this below. I need to calculate Actual - Target. If the result is Positive (&amp;gt;0), then I need to show Top 10 CustomerID.&lt;/P&gt;&lt;P&gt;Also, if the result is Negative (&amp;lt;0), then I need to show Bottom 10 CustomerID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to create an expression till this (using a Single Field). How to show RANK using difference (Actual - Target)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;CustomerID = {"=Rank(sum(ActualSales))&amp;lt;=10"}&amp;gt;}ActualSales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Source Table is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="242"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="80"&gt;CustomerID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="81"&gt;ActualSales&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="81"&gt;TargetSales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;120&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;2&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;80&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;3&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;130&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;4&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;140&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;5&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;70&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;6&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;90&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;7&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;110&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;130&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;8&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;160&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;140&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;9&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;180&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;190&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;10&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;120&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;11&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;190&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;12&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;170&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;13&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;160&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;120&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;14&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;150&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;180&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;15&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;80&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;110&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;16&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;70&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;90&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;17&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;60&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;18&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;170&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;160&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;19&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;120&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl64" height="20" style="border-top: none;"&gt;20&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;90&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;100&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;Regards!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2014 18:54:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596901#M221069</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2014-04-19T18:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Top 10 and Worst 10</title>
      <link>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596902#M221070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you can try by adding the minus sign in front of the sum function like this :&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({&amp;lt;CustomerID = {"=Rank(-sum(ActualSales))&amp;lt;=10"}&amp;gt;}ActualSales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2014 19:39:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596902#M221070</guid>
      <dc:creator>mambi</dc:creator>
      <dc:date>2014-04-19T19:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Top 10 and Worst 10</title>
      <link>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596903#M221071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(&lt;/P&gt;&lt;P&gt;{&amp;lt;CustomerID = {"=Rank(sum(ActualSales-TargetSales))&amp;lt;=10 or Rank(-sum(ActualSales-TargetSales))&amp;lt;=10"}&amp;gt;} ActualSales-TargetSales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2014 21:17:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596903#M221071</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-04-19T21:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Top 10 and Worst 10</title>
      <link>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596904#M221072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=sum({$&lt;/P&gt;&lt;P&gt;&amp;lt;CustomerID={"=Rank(sum(ActualSales-TargetSales))&amp;lt;=10"}&amp;gt;&lt;/P&gt;&lt;P&gt;+ &lt;/P&gt;&lt;P&gt;&amp;lt;CustomerID={"=Rank(-sum(ActualSales-TargetSales))&amp;lt;=10"}&amp;gt;}&lt;/P&gt;&lt;P&gt; ActualSales-TargetSales )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Apr 2014 22:41:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596904#M221072</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-04-19T22:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Top 10 and Worst 10</title>
      <link>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596905#M221073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Swuehl, and thank you others for helping.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This helped correctly. Marking it correct and closing the thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Apr 2014 12:13:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Top-10-and-Worst-10/m-p/596905#M221073</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2014-04-20T12:13:43Z</dc:date>
    </item>
  </channel>
</rss>

