<?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: Filtering NULL values from multivalue field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491813#M137258</link>
    <description>&lt;P&gt;"NULL" is not &lt;CODE&gt;NULL&lt;/CODE&gt;.  The former is a value consisting of a string of four characters whereas the latter is the absence of a value.  The &lt;CODE&gt;isnotnull&lt;/CODE&gt; function tests if the field has a value so, since all of your example values are not &lt;CODE&gt;NULL&lt;/CODE&gt;, will return all values.&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2020 14:03:14 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-05-06T14:03:14Z</dc:date>
    <item>
      <title>Filtering NULL values from multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491812#M137257</link>
      <description>&lt;P&gt;I have a transaction with &lt;CODE&gt;mvlist&lt;/CODE&gt; set to true which results in a table where a number of fields display multiple NULL values:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Col1  Col2  Col3
12345 NULL  1111
NULL  XYZ   2222
NULL  NULL  3333
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: this is all 1 row&lt;/P&gt;

&lt;P&gt;I would like it filtered to the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Col1  Col2  Col3
12345 XYZ   1111
            2222
            3333
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In splunk docs I read that &lt;CODE&gt;mvfilter&lt;/CODE&gt; in combination with &lt;CODE&gt;isnotnull&lt;/CODE&gt; or &lt;CODE&gt;!isnull&lt;/CODE&gt; functions can be used when you want to return only values that are not NULL from a multivalue field. Neither of these appear to work for me:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;y=mvfilter(isnotnull(x))
y=mvfilter(!isnull(x))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;While this does:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;y=mvfilter(x!="NULL"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any ideas on why the former doesn't work? Are there any performance differences between each method?&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 13:39:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491812#M137257</guid>
      <dc:creator>dfraseman</dc:creator>
      <dc:date>2020-05-06T13:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering NULL values from multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491813#M137258</link>
      <description>&lt;P&gt;"NULL" is not &lt;CODE&gt;NULL&lt;/CODE&gt;.  The former is a value consisting of a string of four characters whereas the latter is the absence of a value.  The &lt;CODE&gt;isnotnull&lt;/CODE&gt; function tests if the field has a value so, since all of your example values are not &lt;CODE&gt;NULL&lt;/CODE&gt;, will return all values.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 14:03:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491813#M137258</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-06T14:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering NULL values from multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491814#M137259</link>
      <description>&lt;P&gt;My guess would be that the transaction with mvlist=true does not return &lt;CODE&gt;NULL&lt;/CODE&gt; as a value but rather "NULL" as a string. You can easily test the assumption by trying len(x). If it returns 4, then the transaction has written the word "NULL" into the result. If len(x) gives you nothing or 0, then it's the &lt;CODE&gt;NULL&lt;/CODE&gt; value itself.  From what you've observed, I think, it's the first.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 14:07:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491814#M137259</guid>
      <dc:creator>ololdach</dc:creator>
      <dc:date>2020-05-06T14:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering NULL values from multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491815#M137260</link>
      <description>&lt;P&gt;Your assumption is correct. len(x) returns 4 for the NULL occurrences. Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 14:26:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/491815#M137260</guid>
      <dc:creator>dfraseman</dc:creator>
      <dc:date>2020-05-06T14:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering NULL values from multivalue field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/547492#M155256</link>
      <description>&lt;P&gt;Say eg I have Category field with NULL value so simply use below code,&lt;/P&gt;&lt;P&gt;Category!=NULL&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 09:34:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filtering-NULL-values-from-multivalue-field/m-p/547492#M155256</guid>
      <dc:creator>technocrat007</dc:creator>
      <dc:date>2021-04-10T09:34:07Z</dc:date>
    </item>
  </channel>
</rss>

