<?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 replace blank with &amp;quot;NA&amp;quot; while using Rex command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-blank-with-quot-NA-quot-while-using-Rex-command/m-p/666308#M228576</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249918"&gt;@manojchacko78&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can use fillnull to replace spaces with&amp;nbsp; "NA"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=AddtionalData "Business unit:(?&amp;lt;BusinessUnit&amp;gt;[^,]+)"
| rex field=AddtionalData "Location code:(?&amp;lt;Locationcode&amp;gt;[^,]+)"
| rex field=AddtionalData "Job code :(?&amp;lt;Jobcode&amp;gt;[^,]+)"
| fillnull value="NA" BusinessUnit 
| fillnull value="NA" Locationcode 
| fillnull value="NA" Jobcode
| stats count by  BusinessUnit Locationcode Jobcode
| fields - count&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2023 09:08:50 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-10-26T09:08:50Z</dc:date>
    <item>
      <title>How to replace blank with "NA" while using Rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-blank-with-quot-NA-quot-while-using-Rex-command/m-p/666307#M228575</link>
      <description>&lt;P&gt;I am extracting these three values and if there is any empty value in any of the fields, it returns as no result.&lt;/P&gt;&lt;P&gt;How i replace the blank values with &lt;STRONG&gt;NA&lt;/STRONG&gt; in the rex statements&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex field=AddtionalData "Business unit:(?&amp;lt;BusinessUnit&amp;gt;[^,]+)"&lt;BR /&gt;| rex field=AddtionalData "Location code:(?&amp;lt;Locationcode&amp;gt;[^,]+)"&lt;BR /&gt;| rex field=AddtionalData "Job code :(?&amp;lt;Jobcode&amp;gt;[^,]+)"&lt;/P&gt;&lt;P&gt;| stats count by&amp;nbsp; BusinessUnit Locationcode Jobcode&lt;BR /&gt;| fields - count&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 09:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-blank-with-quot-NA-quot-while-using-Rex-command/m-p/666307#M228575</guid>
      <dc:creator>manojchacko78</dc:creator>
      <dc:date>2023-10-26T09:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace blank with "NA" while using Rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-blank-with-quot-NA-quot-while-using-Rex-command/m-p/666308#M228576</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249918"&gt;@manojchacko78&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you can use fillnull to replace spaces with&amp;nbsp; "NA"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=AddtionalData "Business unit:(?&amp;lt;BusinessUnit&amp;gt;[^,]+)"
| rex field=AddtionalData "Location code:(?&amp;lt;Locationcode&amp;gt;[^,]+)"
| rex field=AddtionalData "Job code :(?&amp;lt;Jobcode&amp;gt;[^,]+)"
| fillnull value="NA" BusinessUnit 
| fillnull value="NA" Locationcode 
| fillnull value="NA" Jobcode
| stats count by  BusinessUnit Locationcode Jobcode
| fields - count&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 09:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-blank-with-quot-NA-quot-while-using-Rex-command/m-p/666308#M228576</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-26T09:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace blank with "NA" while using Rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-blank-with-quot-NA-quot-while-using-Rex-command/m-p/666330#M228592</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perfect, thanks, it worked&lt;/P&gt;&lt;P&gt;Have a nice day&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 11:16:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-blank-with-quot-NA-quot-while-using-Rex-command/m-p/666330#M228592</guid>
      <dc:creator>manojchacko78</dc:creator>
      <dc:date>2023-10-26T11:16:23Z</dc:date>
    </item>
  </channel>
</rss>

