<?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: Display top customers if rank is equal in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159963#M378148</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry for making you explain. My intentions were not to do that. I just feel so good when my responses come so close to yours that I tend to do things like these (claiming a function to be my own &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 May 2016 11:18:54 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-27T11:18:54Z</dc:date>
    <item>
      <title>Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159957#M378142</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 this expression to return the top customer for the latest session who had the highest count of orders (Id) - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=only(if(aggr(Rank(&lt;/P&gt;&lt;P&gt;count(distinct {&amp;lt;SessionId={'$(LatestSession)'}&amp;gt;}Id)),&lt;/P&gt;&lt;P&gt;CustName)=1,CustName))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However today, we had 2 customers with the same top count of orders (i.e. rank 1) - in this scenario this function fails. How can I amend this function to return both top ranked customers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 10:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159957#M378142</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2016-05-27T10:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159958#M378143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;STRONG&gt;Concat(DISTINCT&lt;/STRONG&gt; if(aggr(Rank(&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;count(distinct {&amp;lt;SessionId={'$(LatestSession)'}&amp;gt;}Id)&lt;STRONG&gt;,0,1&lt;/STRONG&gt;),&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CustName)&lt;STRONG&gt;&amp;lt;2&lt;/STRONG&gt;, CustName)&lt;STRONG&gt;, ', '&lt;/STRONG&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;edited rank format and function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 10:30:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159958#M378143</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-27T10:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159959#M378144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;=&lt;SPAN style="color: #ff0000;"&gt;Concat(&lt;SPAN style="color: #3d3d3d;"&gt;I&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d;"&gt;f&lt;/SPAN&gt;(Aggr(&lt;SPAN style="color: #ff6600;"&gt;Num(&lt;/SPAN&gt;Rank(&lt;/STRONG&gt;&lt;STRONG&gt;Count(Distinct {&amp;lt;SessionId={'$(LatestSession)'}&amp;gt;}Id))&lt;SPAN style="color: #ff6600;"&gt;)&lt;/SPAN&gt;, &lt;/STRONG&gt;&lt;STRONG&gt;CustName)=1,CustName)&lt;SPAN style="color: #ff0000;"&gt;, ','&lt;/SPAN&gt;)&lt;/STRONG&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;UPDATE: Added the Num() function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 10:31:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159959#M378144</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T10:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159960#M378145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan you stole my Concat function &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159960#M378145</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T11:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159961#M378146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did I &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/shocked.png" /&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't actually seen your post before posting and editing mine.&lt;/P&gt;&lt;P&gt;Initially I just haven't read the request carefully enough to see that the OP wanted to see both leading customers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:07:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159961#M378146</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-27T11:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159962#M378147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Only({&amp;lt;CustName={"=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;Rank(&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; line-height: 1.5em;"&gt;count(distinct {&amp;lt;SessionId={'$(LatestSession)'}&amp;gt;}Id),4)=1&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;"}&amp;gt;}&lt;SPAN style="font-size: 13.3333px;"&gt;CustName&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:12:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159962#M378147</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-27T11:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159963#M378148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am sorry for making you explain. My intentions were not to do that. I just feel so good when my responses come so close to yours that I tend to do things like these (claiming a function to be my own &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:18:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159963#M378148</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T11:18:54Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159964#M378149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you mean Concat() instead of Only()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:20:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159964#M378149</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T11:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159965#M378150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think only will also work, not sure, can you check?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:29:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159965#M378150</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-27T11:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159966#M378151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;I am sorry for making you explain. My intentions were not to do that. I just feel so good when my responses come so close to yours that I tend to do things like these (claiming a function to be my own &lt;SPAN class="emoticon-inline emoticon_wink" style="height: 16px; width: 16px;"&gt;&lt;/SPAN&gt;)&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi Sunny, don't need to be sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But please note that there are slight differences between the two expressions (specifically w.r.t the rank()), for example when the two leading customers are the only two customers in the selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;=Num(Rank(Sum(sale)))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Rank(Sum(sale),0,1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Sum(sale)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1,5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;40&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1003&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1,5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;40&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hence, I think you should test for &amp;lt;2 if you want to make it more stable (or use different rank options).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159966#M378151</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-27T11:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159967#M378152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/15823"&gt;swuehl&lt;/A&gt;‌ &amp;amp; &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌, I used Sunny's because there could be 2 or 3 or 4 etc. customers who have the same highest order count, and would like to list them all. What is the difference between these 2 expressions otherwise? AFAIK, when doing a rank of count(distinct Id), there can only be 1 top rank (i.e. the highest count), and I would like to just retrieve all customers linked to that top rank. If highest count = 100, and 3 customers had 100, then I want to list all 3 customers as the "Top customer(s)".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 11:57:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159967#M378152</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2016-05-27T11:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159968#M378153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Understood.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doesn't mine rank expression deliver this requested result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mentioned, there might be issues with Sunnies expression in special cases:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;=Num(Rank(Sum(sale)))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Rank(Sum(sale),0,1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Sum(sale)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1001&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;40&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1003&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;40&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1004&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;2&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;40&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 12:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159968#M378153</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-27T12:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159969#M378154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting. Yours also works - just realized it will also work if there are more than 2 customers; I confused the "&amp;lt;2" to mean show only top 2. In that case yours would be correct, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 12:11:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159969#M378154</guid>
      <dc:creator>sifatnabil</dc:creator>
      <dc:date>2016-05-27T12:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159970#M378155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah,&amp;nbsp; I believe the &amp;lt;2 can be replaced by =1.&lt;/P&gt;&lt;P&gt;Just wanted to be on the safe side &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 12:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159970#M378155</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-27T12:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159971#M378156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;As I mentioned, there might be issues with Sunnies expression in special cases:&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Stefanies &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt; I have a question here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used this data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Client, Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A, 10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;B, 10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C, 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I am seeing this&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126023_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not seeing 1.5. Would you be able to point out what am I missing here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This did not work &lt;A _jive_internal="true" href="https://community.qlik.com/people/sifatnabil"&gt;Sifat&lt;/A&gt;‌?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;Concat(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3d3d3d;"&gt;I&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;f&lt;/SPAN&gt;(Aggr(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff6600;"&gt;Num(&lt;/SPAN&gt;Rank(&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count(Distinct {&amp;lt;SessionId={'$(LatestSession)'}&amp;gt;}Id))&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff6600;"&gt;)&lt;/SPAN&gt;,&lt;/STRONG&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CustName)=1,CustName)&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;, ','&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 12:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159971#M378156</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T12:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159972#M378157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I tried to explain, just a num(Rank(Sum(Sales))) will not work (i.e. returning 1 for A and B) in special cases, e.g. only A and B are selected:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Client&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Sum(Sales)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;=Num(Rank(Sum(Sales)))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Rank(Sum(Sales),0,1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;20 &lt;/STRONG&gt;&lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;A&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1,5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;B&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1,5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;1&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 12:51:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159972#M378157</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-27T12:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159973#M378158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then the other expression that you proposed seems to show 1.5. Is it showing differently for you then what I have pasted below?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126024_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 12:55:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159973#M378158</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T12:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159974#M378159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be we need this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Num(Rank(Sum(Sales), &lt;SPAN style="color: #ff0000;"&gt;1&lt;/SPAN&gt;, 1))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126025_Capture.PNG" style="height: 508px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 12:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159974#M378159</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T12:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159975#M378160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still, the &amp;lt;2 should catch this kind of issue &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 12:59:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159975#M378160</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-27T12:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Display top customers if rank is equal</title>
      <link>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159976#M378161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without selection&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126026_Capture.PNG" style="height: 192px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Selection:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/126027_Capture.PNG" style="height: 191px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So may be this will work the best?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #575757; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Concat(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;I&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;f&lt;/SPAN&gt;(Aggr(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Num(&lt;/SPAN&gt;Rank(&lt;/STRONG&gt;&lt;SPAN style="color: #575757;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count(Distinct {&amp;lt;SessionId={'$(LatestSession)'}&amp;gt;}Id))&lt;SPAN style="color: #ff0000;"&gt;, 1, 1&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;)&lt;/SPAN&gt;,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #575757; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;CustName)=1,CustName)&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;, ','&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 13:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Display-top-customers-if-rank-is-equal/m-p/1159976#M378161</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-27T13:00:16Z</dc:date>
    </item>
  </channel>
</rss>

