<?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: Why is my stats command with timechart producing null values for a field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-stats-command-with-timechart-producing-null-values-for/m-p/249181#M74410</link>
    <description>&lt;P&gt;You'll need a "by-clause" in the stats or timechart command.    &lt;CODE&gt;BY _time&lt;/CODE&gt; not &lt;CODE&gt;AS _time&lt;/CODE&gt;.  One creates a column, the other creates a row..  Timechart is looking for columns by rows of time.&lt;/P&gt;

&lt;P&gt;Try these:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ide | stats count(eval(msgId=15)) as TIMEOUT, count(eval(msgId=12)) as REQUEST, max(_time) as _time |  eval fraction = TIMEOUT/REQUEST*100 | timechart max(fraction) by _time

index=ide | stats count(eval(msgId=15)) as TIMEOUT, count(eval(msgId=12)) as REQUEST, max(_time) as maxtime by _time |  eval fraction = TIMEOUT/REQUEST*100 | timechart max(fraction) 

index=ide | stats count(eval(msgId=15)) as TIMEOUT, count(eval(msgId=12)) as REQUEST by _time |  eval fraction = TIMEOUT/REQUEST*100 | timechart max(fraction) max(_time) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Wait, why are we getting max(_time)?   Anytime you manipulate _time you cause problems.  Problems that can be fixed but i'm just trying to understand why you need the maximum thereof.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jan 2016 16:26:49 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2016-01-27T16:26:49Z</dc:date>
    <item>
      <title>Why is my stats command with timechart producing null values for a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-stats-command-with-timechart-producing-null-values-for/m-p/249180#M74409</link>
      <description>&lt;P&gt;My stats command is working, but when I pump it into timechart, it shows null values for fraction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ide | stats count(eval(msgId=15)) as TIMEOUT,  count(eval(msgId=12)) as REQUEST, max(_time) as _time | eval fraction = TIMEOUT/REQUEST*100 | timechart max(fraction)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea what I am missing here?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 15:54:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-stats-command-with-timechart-producing-null-values-for/m-p/249180#M74409</guid>
      <dc:creator>brian38401</dc:creator>
      <dc:date>2016-01-27T15:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my stats command with timechart producing null values for a field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-stats-command-with-timechart-producing-null-values-for/m-p/249181#M74410</link>
      <description>&lt;P&gt;You'll need a "by-clause" in the stats or timechart command.    &lt;CODE&gt;BY _time&lt;/CODE&gt; not &lt;CODE&gt;AS _time&lt;/CODE&gt;.  One creates a column, the other creates a row..  Timechart is looking for columns by rows of time.&lt;/P&gt;

&lt;P&gt;Try these:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ide | stats count(eval(msgId=15)) as TIMEOUT, count(eval(msgId=12)) as REQUEST, max(_time) as _time |  eval fraction = TIMEOUT/REQUEST*100 | timechart max(fraction) by _time

index=ide | stats count(eval(msgId=15)) as TIMEOUT, count(eval(msgId=12)) as REQUEST, max(_time) as maxtime by _time |  eval fraction = TIMEOUT/REQUEST*100 | timechart max(fraction) 

index=ide | stats count(eval(msgId=15)) as TIMEOUT, count(eval(msgId=12)) as REQUEST by _time |  eval fraction = TIMEOUT/REQUEST*100 | timechart max(fraction) max(_time) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Wait, why are we getting max(_time)?   Anytime you manipulate _time you cause problems.  Problems that can be fixed but i'm just trying to understand why you need the maximum thereof.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jan 2016 16:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-stats-command-with-timechart-producing-null-values-for/m-p/249181#M74410</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-01-27T16:26:49Z</dc:date>
    </item>
  </channel>
</rss>

