<?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: Fillnull not working on my search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22138#M3750</link>
    <description>&lt;P&gt;After upgrading my search head to 5.0.2 this search no longer works. Was there a change in the way this is handled? The search still runs but now all the rows have a value of 0. Previously only the rows without values had 0's.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Mar 2013 16:04:44 GMT</pubDate>
    <dc:creator>jevenson</dc:creator>
    <dc:date>2013-03-21T16:04:44Z</dc:date>
    <item>
      <title>Fillnull not working on my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22136#M3748</link>
      <description>&lt;P&gt;I've got a search that looks something like this:&lt;/P&gt;

&lt;P&gt;search | eval Minutes=case(field&amp;lt;120,"0 to 2", field&amp;gt;=120 AND field&amp;lt;180, "2 to 3 mins", field&amp;gt;=180 AND field&amp;lt;240, "3 to 4 mins") | chart count as Sent by Minutes.&lt;/P&gt;

&lt;P&gt;The problem is that the Send field does not always have values, and I am trying to fill those values with 0. Right now they just don't return anything, so if "2 to 3 mins" has a count of 0 it just doesn't show up in the results, like this:&lt;/P&gt;

&lt;P&gt;.....Minutes .....Sent&lt;BR /&gt;&lt;BR /&gt;
 1. 0 to 2 mins...503&lt;BR /&gt;&lt;BR /&gt;
 2. 3 to 4 mins... 20&lt;/P&gt;

&lt;P&gt;What I'd like to see is this:&lt;/P&gt;

&lt;P&gt;.....Minutes ...... Sent&lt;BR /&gt;&lt;BR /&gt;
1. 0 to 2 mins ....503&lt;BR /&gt;&lt;BR /&gt;
2. 2 to 3 mins .... 0&lt;BR /&gt;&lt;BR /&gt;
3. 3 to 4 mins ....20&lt;/P&gt;

&lt;P&gt;I've tried adding fillnull, but it doesn't work.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2013 18:13:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22136#M3748</guid>
      <dc:creator>jevenson</dc:creator>
      <dc:date>2013-02-06T18:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Fillnull not working on my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22137#M3749</link>
      <description>&lt;P&gt;Fillnull cant do it because it can only fill null fields, not create whole rows. &lt;/P&gt;

&lt;P&gt;Here's a way though.  We can make dummy rows and add them using an append.   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search | eval Minutes=case(field&amp;lt;120,"0 to 2", field&amp;gt;=120 AND field&amp;lt;180, "2 to 3 mins", field&amp;gt;=180 AND field&amp;lt;240, "3 to 4 mins") | stats count as Sent by Minutes | append [| stats count | eval Minutes=split("0 to 2,2 to 3 mins,3 to 4 mins",",") | mvexpand Minutes | eval Sent=0] | stats sum(Sent) as Sent by Minutes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here's a breakdown about what the heck I'm doing inside that append:: &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| stats count&lt;/CODE&gt;, all by itself, will create a single row with a field called 'count'&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;fields - count&lt;/CODE&gt; will take away our count field.  Leaving a totally empty but useful row. (hey presto!)&lt;/P&gt;

&lt;P&gt;the next eval will create a multivalued field called "Minutes" that has each of our dummy values. &lt;/P&gt;

&lt;P&gt;The mvexpand turns the set from one row with a multivalued "Minutes" field, into N rows with single-valued "Minutes" field. &lt;/P&gt;

&lt;P&gt;Then to make the exercise easier to follow, we give them a "Sent" field that happens to be "0".   Technically this is unnecessary as the nulls would work just as well as explicit 0's. &lt;/P&gt;

&lt;P&gt;Picture that set of events being appended onto the set before the append command. Then the last stats clause will count them, but the zeros will make the dummy rows not affect our totals. &lt;/P&gt;

&lt;P&gt;Note that the "0 to 2 mins" and all those have to match character for character. There were some inconsistencies in your question that I kept in there, but keep a close eye or else the last stats command wont line it all up correctly. &lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 04:22:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22137#M3749</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-02-07T04:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Fillnull not working on my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22138#M3750</link>
      <description>&lt;P&gt;After upgrading my search head to 5.0.2 this search no longer works. Was there a change in the way this is handled? The search still runs but now all the rows have a value of 0. Previously only the rows without values had 0's.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2013 16:04:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22138#M3750</guid>
      <dc:creator>jevenson</dc:creator>
      <dc:date>2013-03-21T16:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Fillnull not working on my search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22139#M3751</link>
      <description>&lt;P&gt;'append' does seem broken with Splunk 5.0.2. See my question as well:&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/76493/specific-search-not-working-after-upgrade-to-splunk-50"&gt;http://splunk-base.splunk.com/answers/76493/specific-search-not-working-after-upgrade-to-splunk-50&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 05:57:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Fillnull-not-working-on-my-search/m-p/22139#M3751</guid>
      <dc:creator>tiny3001</dc:creator>
      <dc:date>2013-04-15T05:57:32Z</dc:date>
    </item>
  </channel>
</rss>

