<?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: Forcing a zero count in Time Chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31431#M6476</link>
    <description>&lt;P&gt;Thanks, this is close to what I'm after. Is there a way to do this in a multi-value field? Something like | fillnull value=0 User=User1 User=User2.... and so on?&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2013 14:31:36 GMT</pubDate>
    <dc:creator>watsm10</dc:creator>
    <dc:date>2013-05-13T14:31:36Z</dc:date>
    <item>
      <title>Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31429#M6474</link>
      <description>&lt;P&gt;I'm producing a report for some service owners. It is designed to give them a breakdown of successes and failures split by the user of our service.&lt;/P&gt;

&lt;P&gt;I have the following search:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
index=my5msummary | timechart span=1h count by user useother=f limit=100&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
Which gives the following result:&lt;PRE&gt;&lt;CODE&gt;       _time                       User 1  User 2  User 3  User 4&lt;BR /&gt;
1   12/05/2013 00:00:00.000         10232   3159    218     1606&lt;BR /&gt;
2   12/05/2013 01:00:00.000         6043    2670    100     940&lt;BR /&gt;
3   12/05/2013 02:00:00.000         3252    1472    61      548&lt;BR /&gt;
... &lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;Unfortunately User 1 doesn't operate on a Sunday. So User 1 disappears from the table of results.&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;       _time                        User 2  User 3  User 4&lt;BR /&gt;
1   12/05/2013 00:00:00.000         3159    218     1606&lt;BR /&gt;
2   12/05/2013 01:00:00.000         2670    100     940&lt;BR /&gt;
3   12/05/2013 02:00:00.000         1472    61      548&lt;BR /&gt;
... &lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;What I would like to do is show a count of 0 for User 1 which doesn't operate.&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;       _time                       User 1  User 2  User 3  User 4&lt;BR /&gt;
1   12/05/2013 00:00:00.000         0       3159    218     1606&lt;BR /&gt;
2   12/05/2013 01:00:00.000         0       2670    100     940&lt;BR /&gt;
3   12/05/2013 02:00:00.000         0       1472    61      548&lt;BR /&gt;
... &lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
Is there a way to pre-define the "User" field? I've tried eval and inputlookup to no avail. It still doesn't try to count the number of transaction for User 1 (which would be 0).&lt;/P&gt;

&lt;P&gt;I would be grateful for any pointers. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2013 14:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31429#M6474</guid>
      <dc:creator>watsm10</dc:creator>
      <dc:date>2013-05-13T14:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31430#M6475</link>
      <description>&lt;P&gt;&lt;CODE&gt;fillnull&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Fillnull"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Fillnull&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2013 14:23:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31430#M6475</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-05-13T14:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31431#M6476</link>
      <description>&lt;P&gt;Thanks, this is close to what I'm after. Is there a way to do this in a multi-value field? Something like | fillnull value=0 User=User1 User=User2.... and so on?&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2013 14:31:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31431#M6476</guid>
      <dc:creator>watsm10</dc:creator>
      <dc:date>2013-05-13T14:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31432#M6477</link>
      <description>&lt;P&gt;Hi, Did you ever figure this out?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2015 21:40:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31432#M6477</guid>
      <dc:creator>jhartmann9854</dc:creator>
      <dc:date>2015-12-01T21:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31433#M6478</link>
      <description>&lt;P&gt;Same here... looking for a solution. Fillnull only works if you have empty field events for the bin times.&lt;/P&gt;

&lt;P&gt;Update: Actually in my simple case, changing from "| bin _time | stats count by _time" to "| timechart count" did work and fill in empty time bins with the value "0" for charting. &lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 16:03:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31433#M6478</guid>
      <dc:creator>bwlm</dc:creator>
      <dc:date>2019-10-25T16:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31434#M6479</link>
      <description>&lt;P&gt;Like this (you would probably use &lt;CODE&gt;|inputlookup MyListOfUsers.csv&lt;/CODE&gt; instead of the &lt;CODE&gt;|makeresults&lt;/CODE&gt; stuff):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my5msummary
| append
[| makeresults 
| eval raw="user=1 user=2 user=3 user=4 user=5"
| makemv raw
| mvexpand raw
| rename raw AS _raw
| kv
| eval user= "User " . user
| table user]
| timechart span=1h count(some field name that always exists in index=mySummary here) BY user useother=f limit=100
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Oct 2019 20:19:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31434#M6479</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-25T20:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31435#M6480</link>
      <description>&lt;P&gt;Very interesting concept and approach... this looks like it would work. I just had to reference the "kv" is an alias for the &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Extract"&gt;extract command&lt;/A&gt; and only works on "_raw" data (in this case, in a subsearch).&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 23:58:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31435#M6480</guid>
      <dc:creator>bwlm</dc:creator>
      <dc:date>2019-10-25T23:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31436#M6481</link>
      <description>&lt;P&gt;If it works, come back here and click &lt;CODE&gt;Accept&lt;/CODE&gt; to close the question.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 00:06:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31436#M6481</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-26T00:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31437#M6482</link>
      <description>&lt;P&gt;This is not my question so unfortunately I cannot accept the answer, though I did award points! I am unable to reconstruct the use case with timechart (e.g. index=wineventlogs sourctype=wineventlog:security EventCode=4624 | timechart span=1h count by user ) ... in that case I do get the "0" valued filled in for each time span. So I am not sure how the OP's "index=my5msummary" is set up. &lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 02:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31437#M6482</guid>
      <dc:creator>bwlm</dc:creator>
      <dc:date>2019-10-26T02:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31438#M6483</link>
      <description>&lt;P&gt;Sorry, did not notice that you are not OP.&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 04:08:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31438#M6483</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-26T04:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Forcing a zero count in Time Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31439#M6484</link>
      <description>&lt;P&gt;New link to fillnull doc: &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Fillnull"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Fillnull&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 23:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forcing-a-zero-count-in-Time-Chart/m-p/31439#M6484</guid>
      <dc:creator>entpnerd</dc:creator>
      <dc:date>2019-10-30T23:53:37Z</dc:date>
    </item>
  </channel>
</rss>

