<?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: Getting top 3 ranks in textbox in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118689#M18287</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Concat(DISTINCT {&amp;lt;[Item Name]={"=Rank(Sum(Sales))&amp;lt;4"}&amp;gt;} [Item Name], &lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;chr(10) , -Sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/213325_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Sep 2018 04:49:13 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2018-09-12T04:49:13Z</dc:date>
    <item>
      <title>Getting top 3 ranks in textbox</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118687#M18285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to get the top three item names in a text box, ranked by its Sales.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 174px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl64" height="19" width="110"&gt;&lt;STRONG&gt;Item Name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-left: none;" width="64"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" style="border-top: none;"&gt;Item A&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" style="border-top: none;"&gt;Item B&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" style="border-top: none;"&gt;Item C&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;700&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" style="border-top: none;"&gt;Item D&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="19" style="border-top: none;"&gt;Item E&lt;/TD&gt;&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore, I would want my Text box to appear as the below without the sales value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;STRONG&gt;Top 3 Selling Items&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;Item D&lt;/P&gt;&lt;P style="text-align: center;"&gt;Item C&lt;/P&gt;&lt;P style="text-align: center;"&gt;Item A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Sep 2018 23:38:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118687#M18285</guid>
      <dc:creator>mdb_blin</dc:creator>
      <dc:date>2018-09-11T23:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top 3 ranks in textbox</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118688#M18286</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Check this expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Concat(If(Aggr(Rank(Sales),[Item Name]) &amp;lt;=3, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Item Name]&lt;/SPAN&gt;))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Note : Replace Sales and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Item Name &lt;/SPAN&gt;with you actual fields, it will give you the Top 3 &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Item Name &lt;/SPAN&gt;name.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Regards:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Tushar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 01:55:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118688#M18286</guid>
      <dc:creator>tush</dc:creator>
      <dc:date>2018-09-12T01:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top 3 ranks in textbox</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118689#M18287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Concat(DISTINCT {&amp;lt;[Item Name]={"=Rank(Sum(Sales))&amp;lt;4"}&amp;gt;} [Item Name], &lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG&gt;chr(10) , -Sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/213325_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 04:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118689#M18287</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-09-12T04:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top 3 ranks in textbox</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118690#M18288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Try this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only(if(aggr(Rank(Sum(Sales)),Product)=1,Product)) &amp;amp;&amp;nbsp; chr(10) &amp;amp;only(if(aggr(Rank(Sum(Sales)),Product)=2,Product))&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;amp; chr(10)&amp;amp; only(if(aggr(Rank(Sum(Sales)),Product)=3,Product))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/213342_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 07:39:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118690#M18288</guid>
      <dc:creator>gawalimegha</dc:creator>
      <dc:date>2018-09-12T07:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top 3 ranks in textbox</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118691#M18289</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;Does date in the sales data affect the formula? &lt;/P&gt;&lt;P&gt;Can you help provide updated formula for the data set below?&lt;/P&gt;&lt;P&gt;Top 3 should now be Item D, Item C, Item E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="206"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="19" width="69"&gt;Date&lt;/TD&gt;&lt;TD width="73"&gt;Item Name&lt;/TD&gt;&lt;TD width="64"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;1/31/2018&lt;/TD&gt;&lt;TD&gt;Item A&lt;/TD&gt;&lt;TD align="right"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;1/31/2018&lt;/TD&gt;&lt;TD&gt;Item B&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;1/31/2018&lt;/TD&gt;&lt;TD&gt;Item C&lt;/TD&gt;&lt;TD align="right"&gt;700&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;1/31/2018&lt;/TD&gt;&lt;TD&gt;Item D&lt;/TD&gt;&lt;TD align="right"&gt;900&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;1/31/2018&lt;/TD&gt;&lt;TD&gt;Item E&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;2/28/2018&lt;/TD&gt;&lt;TD&gt;Item A&lt;/TD&gt;&lt;TD align="right"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;2/28/2018&lt;/TD&gt;&lt;TD&gt;Item B&lt;/TD&gt;&lt;TD align="right"&gt;300&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;2/28/2018&lt;/TD&gt;&lt;TD&gt;Item C&lt;/TD&gt;&lt;TD align="right"&gt;400&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;2/28/2018&lt;/TD&gt;&lt;TD&gt;Item D&lt;/TD&gt;&lt;TD align="right"&gt;500&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="19"&gt;2/28/2018&lt;/TD&gt;&lt;TD&gt;Item E&lt;/TD&gt;&lt;TD align="right"&gt;800&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 18:53:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118691#M18289</guid>
      <dc:creator>mdb_blin</dc:creator>
      <dc:date>2018-09-12T18:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top 3 ranks in textbox</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118692#M18290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can get the items easily (without sorting them) using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Concat(DISTINCT {&amp;lt;[Item Name]={"=Rank(Sum(Sales))&amp;lt;4"}&amp;gt;} [Item Name], &lt;SPAN style="font-size: 10pt;"&gt;chr(10))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; however, if you want them to be sorted according to their rank, you have to use another aggregation function (since Items have multiple sales values in this case), like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Concat(DISTINCT {&amp;lt;[Item Name]={"=Rank(Sum(Sales))&amp;lt;4"}&amp;gt;} [Item Name],&lt;/P&gt;&lt;P&gt; chr(10),&lt;STRONG&gt; -Aggr(NODISTINCT Sum(Sales),&amp;nbsp; [Item Name])&lt;/STRONG&gt; )&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/213441_Capture.JPG" style="height: 295px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else, to avoid this additional aggr() expression, you could use three expressions for three Items.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Sep 2018 05:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118692#M18290</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2018-09-13T05:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting top 3 ranks in textbox</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118693#M18291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Tresesco.&amp;nbsp; Worked perfectly!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2018 18:10:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-top-3-ranks-in-textbox/m-p/118693#M18291</guid>
      <dc:creator>mdb_blin</dc:creator>
      <dc:date>2018-09-17T18:10:18Z</dc:date>
    </item>
  </channel>
</rss>

