<?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 filter out results from splunk search from a set criteria.? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-results-from-splunk-search-from-a-set-criteria/m-p/483854#M193385</link>
    <description>&lt;P&gt;Thanks Tikar&lt;/P&gt;

&lt;P&gt;Added "where !=" to remove the blank rows &lt;/P&gt;

&lt;P&gt;Appreciate your Help&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2020 13:50:03 GMT</pubDate>
    <dc:creator>NayneshPatel</dc:creator>
    <dc:date>2020-01-16T13:50:03Z</dc:date>
    <item>
      <title>How to filter out results from splunk search from a set criteria.?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-results-from-splunk-search-from-a-set-criteria/m-p/483852#M193383</link>
      <description>&lt;P&gt;I have a raw the i extract and filter and table them according to Country&lt;BR /&gt;
_raw&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[{"Conutry":"America","State":"Nevada","Building":"Small"},
{"Conutry":"America","State":"Nevada","Building":"Medium"},
{"Conutry":"America","State":"Nevada","Building":"Large"},
{"Conutry":"Canada","State":"Montreal","Building":"Small"},
{"Conutry":"Canada","State":"Montreal","Building":"Medium"},
{"Conutry":"Canada","State":"Montreal","Building":"Large"}
{"Conutry":"Spain","State":"Barcelona","Building":"Small"},
{"Conutry":"Spain","State":"Barcelona","Building":"Medium"},
{"Conutry":"Spain","State":"Barcelona","Building":"Large"},
{"Conutry":"Spain","State":"Barcelona","Building":"Extra_Large"}]
etc....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My Search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz 
| sourcepath=xyz 
| rename {}.* as * 
| eval tmp=mvzip(mvzip(Conutry,State),Building) 
| mvexpand tmp | eval Conutry=mvindex(split(tmp,","),0),State=mvindex(split(tmp,","),1),Building=mvindex(split(tmp,","),2) 
| table Conutry, State, Building
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My Results are grouped by country as follows&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Country..../....State..../...Building
America......Nevada........Small
....................Nevada.........Medium
....................Nevada.........Large
Canada.......Montreal......Small
....................Montreal.......Medium
....................Montreal.......Large
Spain.........Barcelona......Small
...................Barcelona......Medium
...................Barcelona......Large
...................Barcelona......Extra_Large
etc....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do i search or filter out the "Building" Column so that if it contains anything OTHER THAN "Small\Medium\Large", display the results. Note the field "Extra_Large" is NOT the same and can be any word&lt;/P&gt;

&lt;P&gt;Expected Results should be&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Country..../....State..../...Building
Spain.........Barcelona......Small
...................Barcelona......Medium
...................Barcelona......Large
...................Barcelona......Extra_Large
France.......Paris................Small
...................Paris................Medium
...................Paris................Large
...................Paris................Too_Small
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help appreciated&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 12:06:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-results-from-splunk-search-from-a-set-criteria/m-p/483852#M193383</guid>
      <dc:creator>NayneshPatel</dc:creator>
      <dc:date>2020-01-16T12:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out results from splunk search from a set criteria.?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-results-from-splunk-search-from-a-set-criteria/m-p/483853#M193384</link>
      <description>&lt;P&gt;Hi @NayneshPatel :&lt;/P&gt;

&lt;P&gt;Can you try by &lt;STRONG&gt;&lt;EM&gt;mvfilter&lt;/EM&gt;&lt;/STRONG&gt;, her an example that can filter Building:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval HRA="Small,Medium,Large,Extra_Large,Too_Small"
| eval HRA=split(HRA,",")
| mvexpand HRA
| stats values(HRA) as HRA
| eval x=mvfilter(NOT (like(HRA,"Medium")  OR like(HRA,"Small") OR  like(HRA,"Large")))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jan 2020 13:34:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-results-from-splunk-search-from-a-set-criteria/m-p/483853#M193384</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2020-01-16T13:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out results from splunk search from a set criteria.?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-results-from-splunk-search-from-a-set-criteria/m-p/483854#M193385</link>
      <description>&lt;P&gt;Thanks Tikar&lt;/P&gt;

&lt;P&gt;Added "where !=" to remove the blank rows &lt;/P&gt;

&lt;P&gt;Appreciate your Help&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 13:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-results-from-splunk-search-from-a-set-criteria/m-p/483854#M193385</guid>
      <dc:creator>NayneshPatel</dc:creator>
      <dc:date>2020-01-16T13:50:03Z</dc:date>
    </item>
  </channel>
</rss>

