<?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: How to rank dynamic scores with ties in Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/503858#M141008</link>
    <description>&lt;P&gt;when i tried same i got ranks but some ranks are missing.&lt;/P&gt;&lt;P&gt;Ex: i got ranks like below&lt;/P&gt;&lt;P&gt;score&amp;nbsp; &amp;nbsp; Rank&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;125&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;165&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;/P&gt;&lt;P&gt;170&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why it is happening how to solve it?&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2020 06:25:33 GMT</pubDate>
    <dc:creator>shivareddysompa</dc:creator>
    <dc:date>2020-06-11T06:25:33Z</dc:date>
    <item>
      <title>How to rank dynamic scores with ties in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/336895#M141005</link>
      <description>&lt;P&gt;I have dynamic number of scores that I wanted to be ranked. For example I have 5 scores - 100, 100, 99, 98, 98. The top rank should be 5 all the way down to 1 but in case of ties, the total rank (of ties) when added should be distributed equally in those scores with tie values. For my set of example above, rank should be: &lt;BR /&gt;Score : Rank&lt;BR /&gt;100 : 4.5&lt;BR /&gt;100 : 4.5&lt;BR /&gt;99 : 3&lt;BR /&gt;98 : 1.5&lt;BR /&gt;98 : 1.5&lt;/P&gt;
&lt;P&gt;Another example if there are no ties:&lt;BR /&gt;Score : Rank&lt;BR /&gt;100 : 5&lt;BR /&gt;99 : 4&lt;BR /&gt;88 : 3&lt;BR /&gt;76 : 2&lt;BR /&gt;75 : 1&lt;/P&gt;
&lt;P&gt;Second example is easily achievable via streamstats command however I'm having a hard time when there are tie scores. &lt;BR /&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2020 18:31:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/336895#M141005</guid>
      <dc:creator>rolly_deguzman</dc:creator>
      <dc:date>2020-06-17T18:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to rank dynamic scores with ties in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/336896#M141006</link>
      <description>&lt;P&gt;Hi rolly_deguzman,&lt;BR /&gt;
Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| fields score 
| sort score 
| eval rank=1 
| accum rank 
| eventstats sum(rank) AS rank count BY score 
| eval rank=rank/count
| sort -rank
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Sat, 28 Oct 2017 16:41:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/336896#M141006</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-28T16:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to rank dynamic scores with ties in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/336897#M141007</link>
      <description>&lt;P&gt;This solution works flawlessly! Thank you very much! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 06:25:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/336897#M141007</guid>
      <dc:creator>rolly_deguzman</dc:creator>
      <dc:date>2017-10-30T06:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to rank dynamic scores with ties in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/503858#M141008</link>
      <description>&lt;P&gt;when i tried same i got ranks but some ranks are missing.&lt;/P&gt;&lt;P&gt;Ex: i got ranks like below&lt;/P&gt;&lt;P&gt;score&amp;nbsp; &amp;nbsp; Rank&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&lt;/P&gt;&lt;P&gt;100&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;&lt;P&gt;125&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;&lt;P&gt;165&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7&lt;/P&gt;&lt;P&gt;170&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;why it is happening how to solve it?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 06:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rank-dynamic-scores-with-ties-in-Splunk/m-p/503858#M141008</guid>
      <dc:creator>shivareddysompa</dc:creator>
      <dc:date>2020-06-11T06:25:33Z</dc:date>
    </item>
  </channel>
</rss>

