<?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 replace or hide aggregate 0s in timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/replace-or-hide-aggregate-0s-in-timechart/m-p/64822#M16001</link>
    <description>&lt;P&gt;I have a search that returns number of apache processes per host:&lt;/P&gt;

&lt;P&gt;sourcetype="ps" earliest="-7m" | multikv filter apache | search USER="apache" | timechart span=30s count as linecount_apache by host&lt;/P&gt;

&lt;P&gt;However, this results in 0 values for some hosts for last or first rows when, presumably, some data is out of range or isn't available yet. What would be the best way to hide or replace these 0s with nulls so they are not displayed on the report? Piping to eval or replace like this:&lt;/P&gt;

&lt;P&gt;| eval linecount_apache=if(linecount_apache==0,null,linecount_apache)&lt;/P&gt;

&lt;P&gt;seemed to have no effect on the result. Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:49:58 GMT</pubDate>
    <dc:creator>zdavitiani_splu</dc:creator>
    <dc:date>2020-09-28T09:49:58Z</dc:date>
    <item>
      <title>replace or hide aggregate 0s in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/replace-or-hide-aggregate-0s-in-timechart/m-p/64822#M16001</link>
      <description>&lt;P&gt;I have a search that returns number of apache processes per host:&lt;/P&gt;

&lt;P&gt;sourcetype="ps" earliest="-7m" | multikv filter apache | search USER="apache" | timechart span=30s count as linecount_apache by host&lt;/P&gt;

&lt;P&gt;However, this results in 0 values for some hosts for last or first rows when, presumably, some data is out of range or isn't available yet. What would be the best way to hide or replace these 0s with nulls so they are not displayed on the report? Piping to eval or replace like this:&lt;/P&gt;

&lt;P&gt;| eval linecount_apache=if(linecount_apache==0,null,linecount_apache)&lt;/P&gt;

&lt;P&gt;seemed to have no effect on the result. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:49:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/replace-or-hide-aggregate-0s-in-timechart/m-p/64822#M16001</guid>
      <dc:creator>zdavitiani_splu</dc:creator>
      <dc:date>2020-09-28T09:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: replace or hide aggregate 0s in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/replace-or-hide-aggregate-0s-in-timechart/m-p/64823#M16002</link>
      <description>&lt;P&gt;Hi! You can use the fillnull command, as described in this topic:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/fillnull"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/fillnull&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;to fill the empty field values with NULL:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fillnull value=NULL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;before the timechart command, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | fillnull linecount_apache=NULL | timechart span=30s count as linecount_apache by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2011 18:37:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/replace-or-hide-aggregate-0s-in-timechart/m-p/64823#M16002</guid>
      <dc:creator>sophy</dc:creator>
      <dc:date>2011-08-25T18:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: replace or hide aggregate 0s in timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/replace-or-hide-aggregate-0s-in-timechart/m-p/64824#M16003</link>
      <description>&lt;P&gt;Use the 'partial' argument to timechart:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart span=30s count as linecount_apache by host partial=f
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timechart"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Timechart&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;partial
    Syntax: partial=&amp;lt;bool&amp;gt; 
    Description: Controls if partial time buckets should be retained or not. Only the first and last
    bucket could ever be partial. Defaults to True|T, meaning that they are retained. 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Aug 2011 20:32:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/replace-or-hide-aggregate-0s-in-timechart/m-p/64824#M16003</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-08-25T20:32:00Z</dc:date>
    </item>
  </channel>
</rss>

