<?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: Using Rank in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183827#M383255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you kindly provide me the expressions for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(vTopRank) and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;$(vBottomRank).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But however, the above expression helps me to filter out the data according to top or bottom N. but my requirement is&amp;nbsp; if i wanna to see only top 2 and 3 customer sales or bottom 2 and 3 customer sales . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Sep 2016 17:37:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-09-14T17:37:36Z</dc:date>
    <item>
      <title>Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183825#M383253</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;Below is the table i am using &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 170px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="106"&gt;Customer name&lt;/TD&gt;&lt;TD width="64"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sale&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A1&lt;/TD&gt;&lt;TD align="right"&gt;938&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A2&lt;/TD&gt;&lt;TD align="right"&gt;324&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A3&lt;/TD&gt;&lt;TD align="right"&gt;302&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A4&lt;/TD&gt;&lt;TD align="right"&gt;463&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A5&lt;/TD&gt;&lt;TD align="right"&gt;427&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A6&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A7&lt;/TD&gt;&lt;TD align="right"&gt;277&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A8&lt;/TD&gt;&lt;TD align="right"&gt;387&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A9&lt;/TD&gt;&lt;TD align="right"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;A10&lt;/TD&gt;&lt;TD align="right"&gt;183&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need create two&amp;nbsp; tables for top 5 and bottom 5 . In bottom 5 i need to exclude whose customer having "zero" in their sales&amp;nbsp;&amp;nbsp;&amp;nbsp; . User is flexible to select any top n or bottom&amp;nbsp; n b/w 5 (i.e., top 1-2 or bottom 2-3 or top 3-4)&amp;nbsp; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could any one help me .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 09:50:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183825#M383253</guid>
      <dc:creator />
      <dc:date>2016-09-14T09:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183826#M383254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Create two tables, Customer name being dimension in both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then as expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;CustomerName = {"Rank(Sum(Sales))&amp;lt;=$(vTopRank)"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;resp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Sum({&amp;lt;CustomerName = {"Rank(-Sum({&amp;lt;Sales = {'&amp;gt;0'}&amp;gt;} Sales))&amp;lt;=$(vBottomRank)"}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 16:07:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183826#M383254</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-09-14T16:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183827#M383255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you kindly provide me the expressions for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(vTopRank) and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;$(vBottomRank).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But however, the above expression helps me to filter out the data according to top or bottom N. but my requirement is&amp;nbsp; if i wanna to see only top 2 and 3 customer sales or bottom 2 and 3 customer sales . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 17:37:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183827#M383255</guid>
      <dc:creator />
      <dc:date>2016-09-14T17:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183828#M383256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;vTopRank and vBottomRank are just variables that hold a number (Top or Bottom N customers).&lt;/P&gt;&lt;P&gt;I thought that's what you intended (creating e.g. a slider so the user can select N)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've&amp;nbsp; also noticed I forgot the leading equal sign in the set modifier to indicate an advanced search:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;=Sum({&amp;lt;CustomerName = {"&lt;STRONG&gt;=&lt;/STRONG&gt;Rank(Sum(Sales))&amp;lt;=$(vTopRank)"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;resp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;=Sum({&amp;lt;CustomerName = {"&lt;STRONG&gt;=&lt;/STRONG&gt;Rank(-Sum({&amp;lt;Sales = {'&amp;gt;0'}&amp;gt;} Sales))&amp;lt;=$(vBottomRank)"}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 18:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183828#M383256</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-09-14T18:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183829#M383257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for previous reply..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when i using ur bottom expression(for bottom 4 customer) . the output is show below&lt;/P&gt;&lt;P&gt;&lt;IMG alt="t1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/137569_t1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the user wanna to only bottom 2 to 4 records &lt;/P&gt;&lt;P&gt;&lt;IMG alt="t2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/137573_t2.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that is, he wanna to see only &lt;/P&gt;&lt;P&gt;&lt;IMG alt="t3.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/137574_t3.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly help me ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 12:12:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183829#M383257</guid>
      <dc:creator />
      <dc:date>2016-09-15T12:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183830#M383258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add a range to the condition like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;=Sum({&amp;lt;CustomerName = {"&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;=&lt;/STRONG&gt;Rank(-Sum({&amp;lt;Sales = {'&amp;gt;0'}&amp;gt;} Sales))&amp;lt;=$(Max) and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px; background-color: #f2f2f2;"&gt;Rank(-Sum({&amp;lt;Sales = {'&amp;gt;0'}&amp;gt;} Sales))&amp;gt;=$(Min)&lt;/SPAN&gt;"}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:20:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183830#M383258</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-09-15T16:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183831#M383259</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;Thanks a lot ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 16:55:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183831#M383259</guid>
      <dc:creator />
      <dc:date>2016-09-15T16:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183832#M383260</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;If we want to see along with zero values for bottom customers ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have removed &amp;gt;0 from the set analysis but i m not getting correct values . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 07:49:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183832#M383260</guid>
      <dc:creator />
      <dc:date>2016-09-20T07:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183833#M383261</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 have a varable&lt;/P&gt;&lt;P&gt;vProdVar= sum(aggr(if(IsNull(Map_Customername) or not( IsNull(Map_Key)),'',TotalMargin),Key,[customer name]))+sum(aggr(if(IsNull(Mapping_Customername) or not( IsNull(Mapping_Key)),'',[Total margin]*-1),Key,[customer name]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in straight table .. i m using the below dimension&amp;nbsp; for selecting bottom customers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AGGR(IF(Rank(-$(vProdVar),4)&amp;gt;=$(vMin) AND&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Rank(-$(vProdVar),4)&amp;lt;=$(vMax)) ,[customer name] ),[customer name] ) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am getting error with rank function . Could you kindly help me .. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks advance &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 13:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183833#M383261</guid>
      <dc:creator />
      <dc:date>2016-09-20T13:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using Rank</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183834#M383262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what your complex variable should return.&lt;/P&gt;&lt;P&gt;Could you post a small sample QVW that demonstrates also your data model?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2016 17:08:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Rank/m-p/1183834#M383262</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-09-20T17:08:09Z</dc:date>
    </item>
  </channel>
</rss>

