<?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: Get top values with null empty fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-top-values-with-null-empty-fields/m-p/195649#M56412</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PNAME=XBarAssembler ActivityId !=null STATUS=DEBUG | eval iNRPMPLANTCD=coalesce(iNRPMPLANTCD,"NULL")| eval iNTESTPGMCD=coalesce(iNTESTPGMCD,"NULL")| eval iNDATETYPE=coalesce(iNDATETYPE,"NULL")| eval iNLASTXOPTNS=coalesce(iNLASTXOPTNS,"NULL")| eval iNINTERVALNBR=coalesce(iNINTERVALNBR,"NULL")| top limit=50000 iNRPMPLANTCD,iNTESTPGMCD, iNDATETYPE, iNLASTXOPTNS, iNINTERVALNBR
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 26 Aug 2014 17:20:48 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-08-26T17:20:48Z</dc:date>
    <item>
      <title>Get top values with null empty fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-top-values-with-null-empty-fields/m-p/195648#M56411</link>
      <description>&lt;P&gt;Hello.  I am new to splunk and regex so please bear with me. I have the following log file format&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;iNRPMPLANTCD: AR| iNDATETYPE: lastShift| iNTESTSTARTDATE: | iNTESTENDDATE: | iNINTERVALNBR: 1| 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I defined my fields with the following regex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?i) iNRPMPLANTCD: (?P&amp;lt;iNRPMPLANTCD&amp;gt;[^\|]+)
(?i) iNDATETYPE: (?P&amp;lt;iNDATETYPE&amp;gt;[^\|]+)
(?i) iNTESTSTARTDATE: (?P&amp;lt;iNTESTSTARTDATE&amp;gt;[^\|]+)
(?i) iNTESTENDDATE: (?P&amp;lt;iNTESTENDDATE&amp;gt;[^\|]+)
(?i) iNINTERVALNBR: (?P&amp;lt;iNINTERVALNBR&amp;gt;[^\|]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;PNAME=XBarAssembler ActivityId !=null STATUS=DEBUG | top limit=50000 iNRPMPLANTCD,iNTESTPGMCD,  iNDATETYPE,  iNLASTXOPTNS, iNINTERVALNBR&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;When I try and do a top so see the usage patterns the records that have null/empty fields are not counted.  I want to count these.  I have tried to use the fillnull value="Null" and I have tried eval to replace the null value with a value... eval LastOptions = if(iNLASTXOPTNS=="","Null",iNLASTXOPTNS) but I can't seem to figure out what is being held in the field to replace it with a string so it will be counted.   Any help is greatly appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 26 Aug 2014 16:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-top-values-with-null-empty-fields/m-p/195648#M56411</guid>
      <dc:creator>locguero</dc:creator>
      <dc:date>2014-08-26T16:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get top values with null empty fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-top-values-with-null-empty-fields/m-p/195649#M56412</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;PNAME=XBarAssembler ActivityId !=null STATUS=DEBUG | eval iNRPMPLANTCD=coalesce(iNRPMPLANTCD,"NULL")| eval iNTESTPGMCD=coalesce(iNTESTPGMCD,"NULL")| eval iNDATETYPE=coalesce(iNDATETYPE,"NULL")| eval iNLASTXOPTNS=coalesce(iNLASTXOPTNS,"NULL")| eval iNINTERVALNBR=coalesce(iNINTERVALNBR,"NULL")| top limit=50000 iNRPMPLANTCD,iNTESTPGMCD, iNDATETYPE, iNLASTXOPTNS, iNINTERVALNBR
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Aug 2014 17:20:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-top-values-with-null-empty-fields/m-p/195649#M56412</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-26T17:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get top values with null empty fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-top-values-with-null-empty-fields/m-p/195650#M56413</link>
      <description>&lt;P&gt;Man you are awesome!  That is exactly what I needed.  Works like a charm.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Aug 2014 18:08:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-top-values-with-null-empty-fields/m-p/195650#M56413</guid>
      <dc:creator>locguero</dc:creator>
      <dc:date>2014-08-26T18:08:39Z</dc:date>
    </item>
  </channel>
</rss>

