<?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 How to  return 0 when the search has no results in time chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/298998#M90112</link>
    <description>&lt;P&gt;I am trying to see how can we return 0 if no results are found using timechart for a span of 30minutes.i tried using fill null but its not working&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc  sourcetype=qwe HTTP_Code=502 |timechart span=30m count |fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but when I am using a stats command I get the count as 0.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc  sourcetype=qwe HTTP_Code=502 |stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;output&lt;BR /&gt;
count-0&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2017 17:15:51 GMT</pubDate>
    <dc:creator>vrmandadi</dc:creator>
    <dc:date>2017-08-23T17:15:51Z</dc:date>
    <item>
      <title>How to  return 0 when the search has no results in time chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/298998#M90112</link>
      <description>&lt;P&gt;I am trying to see how can we return 0 if no results are found using timechart for a span of 30minutes.i tried using fill null but its not working&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc  sourcetype=qwe HTTP_Code=502 |timechart span=30m count |fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but when I am using a stats command I get the count as 0.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc  sourcetype=qwe HTTP_Code=502 |stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;output&lt;BR /&gt;
count-0&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 17:15:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/298998#M90112</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2017-08-23T17:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to  return 0 when the search has no results in time chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/298999#M90113</link>
      <description>&lt;P&gt;try using &lt;CODE&gt;|makecontinuous span=30m _time |timechart span=30m count&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/SearchReference/Makecontinuous"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/SearchReference/Makecontinuous&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 18:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/298999#M90113</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-08-23T18:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to  return 0 when the search has no results in time chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299000#M90114</link>
      <description>&lt;P&gt;No luck with that&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 18:05:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299000#M90114</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2017-08-23T18:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to  return 0 when the search has no results in time chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299001#M90115</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=qwe HTTP_Code=502 |timechart span=30m count | appendpipe [| stats count | where count=0 | addinfo | eval _time=info_min_time | table _time count]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc sourcetype=qwe HTTP_Code=502 |timechart span=30m count | appendpipe [| stats count | where count=0 | addinfo | eval time=info_min_time." ".info_max_time | table time count | makemv time| mvexpand time | rename time as _time | timechart span=30m max(count) as count]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Aug 2017 18:13:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299001#M90115</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-08-23T18:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to  return 0 when the search has no results in time chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299002#M90116</link>
      <description>&lt;P&gt;I tried this but the output gives you only one time, I am trying to break down into buckets of 30 minutes&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 19:03:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299002#M90116</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2017-08-23T19:03:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to  return 0 when the search has no results in time chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299003#M90117</link>
      <description>&lt;P&gt;Try the updated answer&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 19:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299003#M90117</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-08-23T19:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to  return 0 when the search has no results in time chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299004#M90118</link>
      <description>&lt;P&gt;That worked thank you very much you are always helpful&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 19:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299004#M90118</guid>
      <dc:creator>vrmandadi</dc:creator>
      <dc:date>2017-08-23T19:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to  return 0 when the search has no results in time chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299005#M90119</link>
      <description>&lt;P&gt;the update one is the one works for me !&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 04:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-0-when-the-search-has-no-results-in-time-chart/m-p/299005#M90119</guid>
      <dc:creator>jackw_splunk</dc:creator>
      <dc:date>2020-01-20T04:31:26Z</dc:date>
    </item>
  </channel>
</rss>

