<?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 Query help with search using sum(count) and 2 subsearches using count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143012#M39714</link>
    <description>&lt;P&gt;I have a query that combines 1 search and 2 sub-searches.  The main search is a summary index and sum(count) in the timechart to look right.  The 2 sub searches do not need sum(count) - they just need "count" so they are represented properly on the timechart.&lt;/P&gt;

&lt;P&gt;I was thinking if there was a way to convert sum(count) to count I would be good. &lt;/P&gt;

&lt;P&gt;This summary index runs every 15 minutes and buckets by the minute:&lt;/P&gt;

&lt;P&gt;Here's my Attempt to translate sum(count) to count:&lt;BR /&gt;
    index="summary_onemin" error | evenstats sum(count) as count by _time | append [| search index=power_user "null"  | bucket _time span=2m | eval CODE=powerNULL] | timechart span=2m by CODE&lt;/P&gt;

&lt;P&gt;Without the subsearch the search would look like this and works as intended:&lt;BR /&gt;
index="summary_onemin" error | timechart sum(count) as COUNT by CODE&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:04:28 GMT</pubDate>
    <dc:creator>subtrakt</dc:creator>
    <dc:date>2020-09-28T17:04:28Z</dc:date>
    <item>
      <title>Query help with search using sum(count) and 2 subsearches using count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143012#M39714</link>
      <description>&lt;P&gt;I have a query that combines 1 search and 2 sub-searches.  The main search is a summary index and sum(count) in the timechart to look right.  The 2 sub searches do not need sum(count) - they just need "count" so they are represented properly on the timechart.&lt;/P&gt;

&lt;P&gt;I was thinking if there was a way to convert sum(count) to count I would be good. &lt;/P&gt;

&lt;P&gt;This summary index runs every 15 minutes and buckets by the minute:&lt;/P&gt;

&lt;P&gt;Here's my Attempt to translate sum(count) to count:&lt;BR /&gt;
    index="summary_onemin" error | evenstats sum(count) as count by _time | append [| search index=power_user "null"  | bucket _time span=2m | eval CODE=powerNULL] | timechart span=2m by CODE&lt;/P&gt;

&lt;P&gt;Without the subsearch the search would look like this and works as intended:&lt;BR /&gt;
index="summary_onemin" error | timechart sum(count) as COUNT by CODE&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:04:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143012#M39714</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2020-09-28T17:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Query help with search using sum(count) and 2 subsearches using count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143013#M39715</link>
      <description>&lt;P&gt;Can you post your full search?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 15:51:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143013#M39715</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-15T15:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Query help with search using sum(count) and 2 subsearches using count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143014#M39716</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="summary_onemin" error | table _time CODE count 
| append [search index=power_user "null" | bucket _time span=2m | eval CODE=powerNULL
| stats count by _time, CODE] 
| timechart span=2m sum(count) as count by CODE
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Jul 2014 21:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143014#M39716</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-15T21:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Query help with search using sum(count) and 2 subsearches using count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143015#M39717</link>
      <description>&lt;P&gt;Thanks Somesoni!&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jul 2014 23:45:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Query-help-with-search-using-sum-count-and-2-subsearches-using/m-p/143015#M39717</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-07-15T23:45:48Z</dc:date>
    </item>
  </channel>
</rss>

