<?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: how to use timechart count to return 0 when value is null, fillnull not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344268#M101971</link>
    <description>&lt;P&gt;Add the usenull flag to the timechart command -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=x OR sourcetype=y OR sourcetype=z | timchart span=1h usenull=true count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 24 Apr 2017 12:52:53 GMT</pubDate>
    <dc:creator>dineshraj9</dc:creator>
    <dc:date>2017-04-24T12:52:53Z</dc:date>
    <item>
      <title>how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344266#M101969</link>
      <description>&lt;P&gt;I am working on a search that returns counts by the hour but when the event has not occur, I would still like to fill in the column with zeros instead of it not appearing at all.  I have tried fillnull, eval = if, eval =ifnull and it still has the same behavior.  Any ideas? How do I create dummy data for when this occurs. &lt;/P&gt;

&lt;P&gt;sourcetype=x Or sourcetype=y Or Sourcetype=z |timchart count span=1h by sourcetype&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:38:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344266#M101969</guid>
      <dc:creator>lasonyadj</dc:creator>
      <dc:date>2017-04-24T12:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344267#M101970</link>
      <description>&lt;P&gt;correction:&lt;BR /&gt;
sourcetype=x Or sourcetype=y Or Sourcetype=z |timechart count span=1h by sourcetype&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:48:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344267#M101970</guid>
      <dc:creator>lasonyadj</dc:creator>
      <dc:date>2017-04-24T12:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344268#M101971</link>
      <description>&lt;P&gt;Add the usenull flag to the timechart command -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=x OR sourcetype=y OR sourcetype=z | timchart span=1h usenull=true count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:52:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344268#M101971</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-04-24T12:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344269#M101972</link>
      <description>&lt;P&gt;Tried that too, it didn't work either.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:56:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344269#M101972</guid>
      <dc:creator>lasonyadj</dc:creator>
      <dc:date>2017-04-24T12:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344270#M101973</link>
      <description>&lt;P&gt;Also tried usenull, it didn't work either.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 12:57:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344270#M101973</guid>
      <dc:creator>lasonyadj</dc:creator>
      <dc:date>2017-04-24T12:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344271#M101974</link>
      <description>&lt;P&gt;You have to ensure that there is at least 1 event from each of the of sourcetype so that you can see 0 values for those. &lt;/P&gt;

&lt;P&gt;If any of x or y or z has no events at all in the time range you are searching, they won't show up in the results with 0 values for any of the time range.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 13:01:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344271#M101974</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-04-24T13:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344272#M101975</link>
      <description>&lt;P&gt;So there is no way to pad these sources with zero when there are no events?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 13:07:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344272#M101975</guid>
      <dc:creator>lasonyadj</dc:creator>
      <dc:date>2017-04-24T13:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344273#M101976</link>
      <description>&lt;P&gt;Try this -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype=x OR sourcetype=y OR sourcetype=z | timchart span=1h usenull=true count by sourcetype | fillnull value=0 x y z
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Apr 2017 13:19:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344273#M101976</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-04-24T13:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344274#M101977</link>
      <description>&lt;P&gt;After you timechart command add:&lt;/P&gt;

&lt;P&gt;| table _time, sourcetype1, sourcetype2, sourcetype3&lt;BR /&gt;
| fillnull sourcetype1, sourcetype2, sourcetype3 &lt;/P&gt;

&lt;P&gt;This should still display the data as a timechart but creating the missing fields to be subject "fillnull"&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 13:21:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344274#M101977</guid>
      <dc:creator>paulbannister</dc:creator>
      <dc:date>2017-04-24T13:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344275#M101978</link>
      <description>&lt;P&gt;That works!! Thanks!1&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 14:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344275#M101978</guid>
      <dc:creator>lasonyadj</dc:creator>
      <dc:date>2017-04-24T14:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344276#M101979</link>
      <description>&lt;P&gt;No problem&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 14:03:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344276#M101979</guid>
      <dc:creator>paulbannister</dc:creator>
      <dc:date>2017-04-24T14:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to use timechart count to return 0 when value is null, fillnull not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344277#M101980</link>
      <description>&lt;P&gt;Great!  Please be sure to accept the answer that works, and upvote any answers that were helpful.  &lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2017 15:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-use-timechart-count-to-return-0-when-value-is-null/m-p/344277#M101980</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-24T15:37:37Z</dc:date>
    </item>
  </channel>
</rss>

