<?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 remove null field after using &amp;quot;where isnotnull&amp;quot; command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209111#M61069</link>
    <description>&lt;P&gt;No luck, I get zero results found by adding trim.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Dec 2016 12:51:00 GMT</pubDate>
    <dc:creator>ECovell</dc:creator>
    <dc:date>2016-12-28T12:51:00Z</dc:date>
    <item>
      <title>How to remove null field after using "where isnotnull" command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209109#M61067</link>
      <description>&lt;P&gt;I am getting a little frustrated with this search... I have a field that just does not want to release the NULL value.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval src_ip=if(isnull(src_ip),"No IP",src_ip) 
| search Username="*-a" 
| convert ctime(_time) as datetime 
| replace "-" WITH "" IN Username
| where isnotnull (Username) 
| stats values(datetime) by src_ip, Username, ComputerName 
| rename src_ip as "Client Address" Username as User_ID ComputerName as "Reporting Server" count as "Number of Successful Login Attempts" percent as "Percent"


Client Address  User_ID                   Reporting Server            values(datetime)
xx.x.xxx.x                                          xxx-xxx.ctg.com            12/27/2016 09:10:00
xx.x.xxx.x       xxxxxx-a                   xxx-xxx.ctg.com            12/27/2016 09:10:00
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried multiple variations to get rid of the null value such as the where isnotnull, search Username!=,.. and others.&lt;BR /&gt;
Does anyone else have a suggestion for me to try?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Ernie&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 18:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209109#M61067</guid>
      <dc:creator>ECovell</dc:creator>
      <dc:date>2016-12-27T18:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove null field after using "where isnotnull" command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209110#M61068</link>
      <description>&lt;P&gt;Try this (just replace your where command with this, rest all same)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where isnotnull(Username) AND trim(Username)!="" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Dec 2016 21:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209110#M61068</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-12-27T21:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove null field after using "where isnotnull" command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209111#M61069</link>
      <description>&lt;P&gt;No luck, I get zero results found by adding trim.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2016 12:51:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209111#M61069</guid>
      <dc:creator>ECovell</dc:creator>
      <dc:date>2016-12-28T12:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove null field after using "where isnotnull" command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209112#M61070</link>
      <description>&lt;P&gt;I ran into the same problem.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;You can't use trim without use eval (e.g. | eval Username=trim(Username))&lt;/LI&gt;
&lt;LI&gt;I found this worked for me without needing to trim:
&lt;CODE&gt;
| where isnotnull(Username) AND Username!=""
&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 01 May 2018 16:58:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-null-field-after-using-quot-where-isnotnull-quot/m-p/209112#M61070</guid>
      <dc:creator>gordo32</dc:creator>
      <dc:date>2018-05-01T16:58:26Z</dc:date>
    </item>
  </channel>
</rss>

