<?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: How to ignore fill null values in the result? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399765#M115881</link>
    <description>&lt;P&gt;This should work better. Let me know&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your search 
 | where isnotnull(ErrorDetail) AND isnotnull(ErrorMessage)
 | stats count by ErrorDetail ErrorMessage 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 01 May 2020 21:05:58 GMT</pubDate>
    <dc:creator>pablo_sanchez</dc:creator>
    <dc:date>2020-05-01T21:05:58Z</dc:date>
    <item>
      <title>How to ignore fill null values in the result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399762#M115878</link>
      <description>&lt;P&gt;In below scenario i want to ignore two vales are null in the result.&lt;/P&gt;

&lt;P&gt;index=test |stats count by ErrorDetail ErrorMessage|fillnull value="Not Available" ErrorDetail |fillnull value="Not Available" ErrorMessage|where ErrorDetail!="Not Available" AND Errormessage!="Not Available"&lt;/P&gt;

&lt;P&gt;Result:&lt;BR /&gt;
PHARMACY              Not Available                                                                                         Not Available   16&lt;BR /&gt;&lt;BR /&gt;
BenefitAccums     INFRASTRUCTURE ERROR- WGMMMIOS BAD RETURN; RC = 1     Not Available   18  &lt;/P&gt;

&lt;P&gt;Excpected Result:&lt;BR /&gt;
BenefitAccums     INFRASTRUCTURE ERROR- WGMMMIOS BAD RETURN; RC = 1     Not Available   18&lt;/P&gt;

&lt;P&gt;Have to exclude both field have not available in the result.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 05:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399762#M115878</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2018-05-16T05:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore fill null values in the result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399763#M115879</link>
      <description>&lt;P&gt;you can try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test 
| stats count by ErrorDetail ErrorMessage 
| where isnotnull(ErrorDetail) AND isnotnull(ErrorMessage)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 06:07:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399763#M115879</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-05-16T06:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore fill null values in the result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399764#M115880</link>
      <description>&lt;P&gt;@karthi2809, try the following filter if you wish to retain BenefitAccum's row&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=test 
| stats count by ErrorDetail ErrorMessage
| fillnull value="Not Available" ErrorDetail,ErrorMessage
| search ErrorDetail!="Not Available" OR ErrorMessage!="Not Available"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere search based on sample data provided:&lt;BR /&gt;
Commands from &lt;CODE&gt;| makeresults&lt;/CODE&gt; till &lt;CODE&gt;| fields - data&lt;/CODE&gt; generate dummy data similar to the output of stats and fillnull commands in your example. I was not sure of &lt;CODE&gt;PHARMACY&lt;/CODE&gt; as it should not show up in results if both ErrorDetail and ErrorMessage are &lt;CODE&gt;NA&lt;/CODE&gt;. So I have created an additional field in my dummy search. Final search filter would still remain the same. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval data="PHARMACY,Not Available,Not Available,16|BenefitAccums,INFRASTRUCTURE ERROR- WGMMMIOS BAD RETURN; RC = 1,Not Available,1"
| makemv data delim="|"
| mvexpand data
| makemv data delim=","
| eval Field1=mvindex(data,0), ErrorDetail=mvindex(data,1),ErrorMessage=mvindex(data,2)
| fields - data
| search ErrorDetail!="Not Available" OR ErrorMessage!="Not Available"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 May 2018 06:16:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399764#M115880</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-16T06:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore fill null values in the result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399765#M115881</link>
      <description>&lt;P&gt;This should work better. Let me know&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; your search 
 | where isnotnull(ErrorDetail) AND isnotnull(ErrorMessage)
 | stats count by ErrorDetail ErrorMessage 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 May 2020 21:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399765#M115881</guid>
      <dc:creator>pablo_sanchez</dc:creator>
      <dc:date>2020-05-01T21:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore fill null values in the result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399766#M115882</link>
      <description>&lt;P&gt;In this query, &lt;CODE&gt;where&lt;/CODE&gt;  can't keep the events has only one field( &lt;EM&gt;ErrorDetail&lt;/EM&gt; or &lt;EM&gt;ErrorMessage&lt;/EM&gt; )&lt;/P&gt;

&lt;P&gt;In this case,&lt;BR /&gt;
after aggregation, if there is not  &lt;EM&gt;ErrorDetail&lt;/EM&gt; or &lt;EM&gt;ErrorMessage&lt;/EM&gt;, it is not populated the result.&lt;/P&gt;

&lt;P&gt;the result is different.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 21:36:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399766#M115882</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-01T21:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore fill null values in the result?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399767#M115883</link>
      <description>&lt;P&gt;You're correct. overlooked it.&lt;BR /&gt;
Perhaps using OR instead will do it. Worked for me on a similar query.&lt;/P&gt;

&lt;PRE&gt; your search 
  | where isnotnull(ErrorDetail) OR isnotnull(ErrorMessage)
  | stats count by ErrorDetail ErrorMessage &lt;/PRE&gt;</description>
      <pubDate>Tue, 05 May 2020 23:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-fill-null-values-in-the-result/m-p/399767#M115883</guid>
      <dc:creator>pablo_sanchez</dc:creator>
      <dc:date>2020-05-05T23:56:13Z</dc:date>
    </item>
  </channel>
</rss>

