<?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: Unique rank in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403915#M425350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, Sunny's solution should work basically the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's up to you, Ronald, to define the criterium that you can use for the tie breaking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note also that my solution has a little flaw:&lt;/P&gt;&lt;P&gt;I was telling to add a small amount below 1 (assuming you are summing up integer values), but then I've used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;+&lt;SPAN style="font-weight: inherit; font-family: inherit;"&gt;&lt;EM&gt;1/FieldIndex('Agent',Agent)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which actually equals 1 for the first agent in load order so might corrupt your ranking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;+&lt;SPAN style="font-weight: inherit; font-family: inherit;"&gt;&lt;EM&gt;1/(FieldIndex('Agent',Agent)+1) &lt;/EM&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should correct for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as I said, there are other criteria possible (like the number of orders one needs to get the total amount, the smaller the better, or something similar, or just the alphabetical order like Sunny used (well I don't like that idea from a personal view) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Oct 2017 14:13:24 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2017-10-20T14:13:24Z</dc:date>
    <item>
      <title>Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403906#M425341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Qlikies,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope one of you can help me out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What are you trying to achieve?&lt;BR /&gt;&lt;/STRONG&gt;We'd like to show some details for the top 3 agents based on an event counter. To this end, I've ranked them and use FirstSortedValue to pick up the field "Agent" for, let's say, the top agent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="php" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15085040930281721 jive_text_macro" jivemacro_uid="_15085040930281721"&gt;
&lt;P&gt;=FirstSortedValue([Agent], -Aggr(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter]),[Agent]))&lt;/P&gt;




&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And for the second best agent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="php" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15085042865977696 jive_text_macro" jivemacro_uid="_15085042865977696"&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;=FirstSortedValue([Agent], -Aggr(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter]),[Agent]))&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fair enough, so what's your problem?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This all works wondefully well, and I was really pleased with myself, right until the moment that the first two agents had the same Sum([#Event Counter]).&lt;BR /&gt;Then, the Rank() returned "1-2" and there can be no FirstSortedValue, apparently. The above expression just returns Null (and my dashboard becomes an incomprehensible mess).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What would you like?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to (randomly) pick just either one of the agents to show the values for. Is there a way to have Rank() return a unique rank number?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403906#M425341</guid>
      <dc:creator>RonaldDoes</dc:creator>
      <dc:date>2017-10-20T13:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403907#M425342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be add DISTINCT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue(&lt;SPAN style="color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; [Agent], -Aggr(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter]) ,[Agent]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403907#M425342</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-20T13:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403908#M425343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestion. Unfortunately, this appears to return only a correct result for the first of the "shared first" agents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ranked agents&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Rank&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Agent&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1-2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1-2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&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;=FirstSortedValue(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; [Agent], -Aggr(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter]) ,[Agent]))&lt;/STRONG&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;BR /&gt;&lt;/STRONG&gt;Returns: A (as expected).&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;=FirstSortedValue(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; [Agent], -Aggr(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter]) ,[Agent]),2)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Returns: C (expected result: B)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403908#M425343</guid>
      <dc:creator>RonaldDoes</dc:creator>
      <dc:date>2017-10-20T13:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403909#M425344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue(DISTINCT [Agent], -Aggr(RangeSum(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter]), Rank(Agent)/1E10), [Agent]))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue(DISTINCT [Agent], -Aggr(RangeSum(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter]), Rank(Agent)/1E10), [Agent]), 2)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403909#M425344</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-20T13:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403910#M425345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe add a distinguishing, tie breaking small amount below 1:&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 style="font-style: inherit;"&gt;=FirstSortedValue(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; [Agent], -Aggr(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter])+&lt;EM&gt;1/FieldIndex('Agent',Agent)&lt;/EM&gt; ,[Agent]))&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;STRONG style="font-style: inherit;"&gt;&lt;BR /&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;&lt;STRONG style="font-style: inherit;"&gt;=FirstSortedValue(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;DISTINCT&lt;/SPAN&gt; [Agent], -Aggr(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter])&lt;EM&gt;+&lt;/EM&gt;&lt;STRONG style="font-style: inherit;"&gt;&lt;EM&gt;1/FieldIndex('Agent',Agent)&lt;/EM&gt;&lt;/STRONG&gt; ,[Agent]),2)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:20:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403910#M425345</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-10-20T13:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403911#M425346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want ot randomly pick one, maybe you can use the rand function to adjust the sort weight. Something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue([Agent], -Aggr(Sum({&amp;lt;SomeDateField =&amp;nbsp; {"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter])&lt;SPAN style="color: #ff0000;"&gt;-Rand()&lt;/SPAN&gt;,[Agent]))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:24:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403911#M425346</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2017-10-20T13:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403912#M425347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Genious! Working perfectly. Thank you very much, Stefan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've taken the liberty of creating a little demo of my original solution, Sunny's suggestion (just adding DISTINCT) and your FieldIndex-based solution which I've attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for the Rand()-suggestion, that would work, however I have multiple objects showing details of the "picked" agents, that would also display randomly display the details for one of both, while the caption could display the other. Thanks for the suggestion, though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Naamloos.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/180370_Naamloos.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 13:59:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403912#M425347</guid>
      <dc:creator>RonaldDoes</dc:creator>
      <dc:date>2017-10-20T13:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403913#M425348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you miss my next suggestion my friend?&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/180357_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to be working just like Stefan's (in your case at least)....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:03:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403913#M425348</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-20T14:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403914#M425349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh and I don't even get a helpful response like others &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;. I guess I was not really helpful at all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:05:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403914#M425349</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-20T14:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403915#M425350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, Sunny's solution should work basically the same way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's up to you, Ronald, to define the criterium that you can use for the tie breaking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note also that my solution has a little flaw:&lt;/P&gt;&lt;P&gt;I was telling to add a small amount below 1 (assuming you are summing up integer values), but then I've used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;+&lt;SPAN style="font-weight: inherit; font-family: inherit;"&gt;&lt;EM&gt;1/FieldIndex('Agent',Agent)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which actually equals 1 for the first agent in load order so might corrupt your ranking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-style: inherit; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;+&lt;SPAN style="font-weight: inherit; font-family: inherit;"&gt;&lt;EM&gt;1/(FieldIndex('Agent',Agent)+1) &lt;/EM&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should correct for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But as I said, there are other criteria possible (like the number of orders one needs to get the total amount, the smaller the better, or something similar, or just the alphabetical order like Sunny used (well I don't like that idea from a personal view) )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:13:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403915#M425350</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-10-20T14:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403916#M425351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're completely right.&lt;/P&gt;&lt;P&gt;I made a mess of it when I tried it out in my actual application and it threw a "Rank function is not allowed inside aggregation".&lt;/P&gt;&lt;P&gt;When implemented correctly it does of course work just as well as Stefan's solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help, it's most appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With kind regards,&lt;/P&gt;&lt;P&gt;Ronald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403916#M425351</guid>
      <dc:creator>RonaldDoes</dc:creator>
      <dc:date>2017-10-20T14:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403917#M425352</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;Thank you for the further improvement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My "specification" for the tie-breaking was "completely random", so I guess the best solution here, from an academic viewpoint, would be the one that offers the best performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have absolutly no clue as to which of the two that might be, so I'll gladly leave that up to someone far smarter than me to decide.&lt;/P&gt;&lt;P&gt;For all practical intents and purposes (future reference), I've marked your solution as correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403917#M425352</guid>
      <dc:creator>RonaldDoes</dc:creator>
      <dc:date>2017-10-20T14:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403918#M425353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ronald,&lt;/P&gt;&lt;P&gt;I know I'm a latecomer to this. I dislike the FirstSortedValue function because of the way it handles ties.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Concat(Aggr(if(Rank(&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;SomeDateField ={"&amp;gt;=$(=DATE(MonthStart(TODAY())))"}, [Agent group] = {"A"}&amp;gt;}[#Event Counter])&lt;/P&gt;&lt;P&gt;),1,1) =&lt;SPAN style="color: #ff0000;"&gt;1&lt;/SPAN&gt;,[Agent]),[Agent]),',')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will return a concatenation of Agents tying for first place rather than being null. Change the figure in red to return the ranking you're looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:22:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403918#M425353</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-10-20T14:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Unique rank</title>
      <link>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403919#M425354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You were really helpful. I mistakenly marked my own reply to your original suggestion as helpful instead of your suggestion. I've corrected this.&lt;/P&gt;&lt;P&gt;Please accept my humble apologies. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/blush.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Oct 2017 14:23:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Unique-rank/m-p/1403919#M425354</guid>
      <dc:creator>RonaldDoes</dc:creator>
      <dc:date>2017-10-20T14:23:17Z</dc:date>
    </item>
  </channel>
</rss>

