<?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: question on stats and blank values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482369#M135129</link>
    <description>&lt;P&gt;also, post your current  &lt;CODE&gt;spl&lt;/CODE&gt; to get better help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Feb 2020 21:30:21 GMT</pubDate>
    <dc:creator>marycordova</dc:creator>
    <dc:date>2020-02-25T21:30:21Z</dc:date>
    <item>
      <title>question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482366#M135126</link>
      <description>&lt;P&gt;i have a table like below.&lt;BR /&gt;
cola:colb:colc:cold&lt;BR /&gt;
1::2:3:&lt;BR /&gt;
::::&lt;BR /&gt;
1:2:3:4&lt;/P&gt;

&lt;P&gt;when i do a stats , i only get non-null values&lt;BR /&gt;
is it possible to show null values in the form of table and eval them to 0...&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 20:14:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482366#M135126</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-02-24T20:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482367#M135127</link>
      <description>&lt;P&gt;How about &lt;CODE&gt;fillnull&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 20:51:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482367#M135127</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-24T20:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482368#M135128</link>
      <description>&lt;P&gt;It depends on your stats.  &lt;/P&gt;

&lt;P&gt;This returms all the values, regardless of null:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt;
| fields cola colb colc cold
| stats values(*) as *

&amp;lt;output&amp;gt;
cola colb colc cold
1    2    3    4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This returns only the values where cold is not null:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt;
| fields cola colb colc cold
| stats values(*) as * by cold

&amp;lt;output&amp;gt;
cold
4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The important thing about the &lt;CODE&gt;by&lt;/CODE&gt; clause in the stats is that it will omit any log events where the fields in that by clause are null, so if you had 2 fields both must be populated for results to be returned, if one of the fields in the by clause is null that log event will not be present in your result set.&lt;/P&gt;

&lt;P&gt;If you do the  &lt;CODE&gt;fillnull&lt;/CODE&gt; as per the other suggestion you would get this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt;
| fillnull value="0"
| fields cola colb colc cold
| stats values(*) as *

&amp;lt;output&amp;gt;
cola colb colc cold
0    0    0    0
1    2    3    4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So really, the point is, what do you want the data to look like at the end, what is it you're trying to ask, what is the story you're trying to tell?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 21:25:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482368#M135128</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2020-02-25T21:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482369#M135129</link>
      <description>&lt;P&gt;also, post your current  &lt;CODE&gt;spl&lt;/CODE&gt; to get better help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2020 21:30:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482369#M135129</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2020-02-25T21:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482370#M135130</link>
      <description>&lt;P&gt;Thanks for responding . My situation is really the "by" one.. (  | stats values(*) as * by cold)&lt;/P&gt;

&lt;P&gt;when i do the stats by, i lose anything that had null value.&lt;BR /&gt;
but we want to see those null ones and they should have value=0&lt;/P&gt;

&lt;P&gt;we are looking at non-compliant numbers and null basically means there are none , so its a good situation, but we are not seeing it in stats.&lt;/P&gt;

&lt;P&gt;so instead of dissapearing , they should show as 0.&lt;BR /&gt;
will that be possible if i do fillnull value=0 for all the fields before i do a stat by ?&lt;BR /&gt;
would this made the stats by to show everything....&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 05:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482370#M135130</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-02-26T05:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482371#M135131</link>
      <description>&lt;P&gt;will try this... &lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 06:56:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482371#M135131</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-02-26T06:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482372#M135132</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=yourIndex 
| fillnull cola colb colc cold
| rest_your_search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;try, simply.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 08:48:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482372#M135132</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-26T08:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482373#M135133</link>
      <description>&lt;P&gt;fillnull works for me.. thanks..&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 06:29:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482373#M135133</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-02-27T06:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: question on stats and blank values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482374#M135134</link>
      <description>&lt;P&gt;fillnull works for me, unfortunately i can mark only 1 answers are "Accept". both your answers were correct..&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 06:30:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/question-on-stats-and-blank-values/m-p/482374#M135134</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2020-02-27T06:30:20Z</dc:date>
    </item>
  </channel>
</rss>

