<?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 Include row for zero resutls in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Include-row-for-zero-resutls/m-p/39160#M8927</link>
    <description>&lt;P&gt;I have several searches that count the number of results per day, using "stats count by date_mday".  My problem is that they don't include days with 0 results, which means I have to do a bit of manipulation after running the search.&lt;/P&gt;

&lt;P&gt;Is there any way of forcing it to include a date entry for days with 0 matches?&lt;/P&gt;

&lt;P&gt;I was wondering if I could achieve this with timechart and fillnull, but found the documentation (&lt;A href="http://www.splunk.com/base/Documentation/4.2.2/SearchReference/Timechart"&gt;http://www.splunk.com/base/Documentation/4.2.2/SearchReference/Timechart&lt;/A&gt;) a bit confusing.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2011 10:06:39 GMT</pubDate>
    <dc:creator>lawrenn</dc:creator>
    <dc:date>2011-07-07T10:06:39Z</dc:date>
    <item>
      <title>Include row for zero resutls</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Include-row-for-zero-resutls/m-p/39160#M8927</link>
      <description>&lt;P&gt;I have several searches that count the number of results per day, using "stats count by date_mday".  My problem is that they don't include days with 0 results, which means I have to do a bit of manipulation after running the search.&lt;/P&gt;

&lt;P&gt;Is there any way of forcing it to include a date entry for days with 0 matches?&lt;/P&gt;

&lt;P&gt;I was wondering if I could achieve this with timechart and fillnull, but found the documentation (&lt;A href="http://www.splunk.com/base/Documentation/4.2.2/SearchReference/Timechart"&gt;http://www.splunk.com/base/Documentation/4.2.2/SearchReference/Timechart&lt;/A&gt;) a bit confusing.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2011 10:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Include-row-for-zero-resutls/m-p/39160#M8927</guid>
      <dc:creator>lawrenn</dc:creator>
      <dc:date>2011-07-07T10:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Include row for zero resutls</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Include-row-for-zero-resutls/m-p/39161#M8928</link>
      <description>&lt;P&gt;Yes you can&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | timechart span="1d" count | eval date_mday=strftime(_time, "%d") | fields count date_mday
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the timechart does most of what you want but the date_mday is blank for dates with no data so the eval recreates this field and finally the fields command cleans up the result.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2011 10:43:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Include-row-for-zero-resutls/m-p/39161#M8928</guid>
      <dc:creator>BobM</dc:creator>
      <dc:date>2011-07-07T10:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Include row for zero resutls</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Include-row-for-zero-resutls/m-p/39162#M8929</link>
      <description>&lt;P&gt;Thank you very much for your help&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2011 10:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Include-row-for-zero-resutls/m-p/39162#M8929</guid>
      <dc:creator>lawrenn</dc:creator>
      <dc:date>2011-07-07T10:59:24Z</dc:date>
    </item>
  </channel>
</rss>

