<?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: Top to a sum by a field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128067#M34762</link>
    <description>&lt;P&gt;Try adding following to your already existing search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval CountF=1|streamstats sum(CountF) as CountF by BRAND | where CountF &amp;lt;11
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Nov 2013 16:41:26 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2013-11-05T16:41:26Z</dc:date>
    <item>
      <title>Top to a sum by a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128063#M34758</link>
      <description>&lt;P&gt;I am trying to get top 10 channels (chanName) by brand (BRAND) based on the duration (durationPerRoom). I have durationPerRoom sorted descending, and if I could head 10 by brand, that would be great. I have tried to do a top function, but it just counts the channels, or counts the durations, etc. Any ideas?&lt;/P&gt;

&lt;P&gt;| stats sum(OF_ROOMS__C) as numberOfRooms,sum(sumDuration) as sumDuration by chanName BRAND|eval durationPerRoom=sumDuration/numberOfRooms| sort by durationPerRoom desc&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:11:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128063#M34758</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2020-09-28T15:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Top to a sum by a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128064#M34759</link>
      <description>&lt;P&gt;Try adding following to your already existing search&lt;/P&gt;

&lt;P&gt;|eval CountF=1|streamstats sum(CountF) as CountF by BRAND | | where CountF &amp;lt;11&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2013 21:07:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128064#M34759</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-04T21:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: Top to a sum by a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128065#M34760</link>
      <description>&lt;P&gt;That worked PERFECTLY! Thank you!!!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2013 16:14:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128065#M34760</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2013-11-05T16:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Top to a sum by a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128066#M34761</link>
      <description>&lt;P&gt;Added my comment as answer, so that you can close the question.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2013 16:41:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128066#M34761</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-05T16:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Top to a sum by a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128067#M34762</link>
      <description>&lt;P&gt;Try adding following to your already existing search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval CountF=1|streamstats sum(CountF) as CountF by BRAND | where CountF &amp;lt;11
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Nov 2013 16:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-to-a-sum-by-a-field/m-p/128067#M34762</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-11-05T16:41:26Z</dc:date>
    </item>
  </channel>
</rss>

