<?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: Can stats latest(X) return a null value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241054#M71672</link>
    <description>&lt;P&gt;I'm actually trying to include instead of exclude the null values from my result.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jan 2016 21:03:18 GMT</pubDate>
    <dc:creator>thunder_wu</dc:creator>
    <dc:date>2016-01-21T21:03:18Z</dc:date>
    <item>
      <title>Can stats latest(X) return a null value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241049#M71667</link>
      <description>&lt;H2&gt;X          Y&lt;/H2&gt;

&lt;P&gt;a          1&lt;BR /&gt;
b          1&lt;BR /&gt;
null      1&lt;/P&gt;

&lt;P&gt;&amp;lt;search&amp;gt; | stats latest(X) by Y&lt;/P&gt;

&lt;P&gt;will return "b" as result, is it possible to have it return null as result?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 19:53:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241049#M71667</guid>
      <dc:creator>thunder_wu</dc:creator>
      <dc:date>2016-01-21T19:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can stats latest(X) return a null value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241050#M71668</link>
      <description>&lt;P&gt;You could do a |fillnull before your stats so that way the null value actually has a value then when stats runs it can populate it correctly.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | fillnull X value="NULL" | stats  latest(X) by Y
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jan 2016 20:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241050#M71668</guid>
      <dc:creator>MattZerfas</dc:creator>
      <dc:date>2016-01-21T20:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can stats latest(X) return a null value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241051#M71669</link>
      <description>&lt;P&gt;The latest functions based on _time so yes it could be possible to have a latest value as null. Run the query in verbose mode and check if the latest event with your criteria indeed has null value for that field.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 20:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241051#M71669</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-01-21T20:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can stats latest(X) return a null value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241052#M71670</link>
      <description>&lt;P&gt;Yes, as @somesoni2 pointed out. If your running your search against time then you will have null results. Are you trying to exclude the null values from your results? &lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 20:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241052#M71670</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-01-21T20:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can stats latest(X) return a null value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241053#M71671</link>
      <description>&lt;P&gt;Thanks MattZerfas. Your answer is working for me. &lt;/P&gt;

&lt;P&gt;I do have a large set of events before | stats though. Anyone know if there should be any concern on the cost or performance if there are thousands or millions events to convert the null value?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 21:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241053#M71671</guid>
      <dc:creator>thunder_wu</dc:creator>
      <dc:date>2016-01-21T21:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can stats latest(X) return a null value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241054#M71672</link>
      <description>&lt;P&gt;I'm actually trying to include instead of exclude the null values from my result.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 21:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241054#M71672</guid>
      <dc:creator>thunder_wu</dc:creator>
      <dc:date>2016-01-21T21:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can stats latest(X) return a null value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241055#M71673</link>
      <description>&lt;P&gt;Large can be a relative term in Splunk.. There could definitely be a performance issue if you're doing &amp;gt; 10 million +. If you see an impact on performance then you may want to consider optimizing your query or setting up a summary index (This is needed on rare occasions when the data is massive) &lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2016 21:07:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-stats-latest-X-return-a-null-value/m-p/241055#M71673</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-01-21T21:07:08Z</dc:date>
    </item>
  </channel>
</rss>

