<?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 do I filter the following data set using a wildcard field name and greater than filter? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441702#M77008</link>
    <description>&lt;P&gt;Thanks for the response!  The problem is that it's adding up all the values which is &lt;STRONG&gt;NOT&lt;/STRONG&gt; what I want.  I just want to iterate through each of the f_* fields, see if the value for each of those fields is &amp;gt; 1 (independent of one another) and print those rows if any of the f_* have a value &amp;gt; 1&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:44:05 GMT</pubDate>
    <dc:creator>splunker1981</dc:creator>
    <dc:date>2020-09-29T21:44:05Z</dc:date>
    <item>
      <title>How do I filter the following data set using a wildcard field name and greater than filter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441700#M77006</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;

&lt;P&gt;I'm stuck trying to figure out how to filter the following data set to get the results shown below. Any assistance would be greatly appreciated. &lt;/P&gt;

&lt;P&gt;Sample results&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;c_1  f_1    f_2 f_3 f_4 f_5
x001f    1  0     0   0     0
x0883g  1   0     0      0      0
x8834c  2   0     0     0      0
x8832d  3   0     0     0      0
x883kd    n           n             n
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like to do a filter by using a field wildcard f_* and &amp;gt; 1 and have it return the complete matching line; like the one below.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    x8834c  2   0     0     0      0
    x8832d  3   0     0     0      0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried doing the following, but no luck...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| foreach f_* 
    [ eval total=total + '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;']
    |where total &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Oct 2018 17:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441700#M77006</guid>
      <dc:creator>splunker1981</dc:creator>
      <dc:date>2018-10-23T17:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter the following data set using a wildcard field name and greater than filter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441701#M77007</link>
      <description>&lt;P&gt;@splunker1981&lt;/P&gt;

&lt;P&gt;Can you please add &lt;CODE&gt;| eval total=0&lt;/CODE&gt; in you search and try again?&lt;/P&gt;

&lt;P&gt;My Sample Search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="
 c_1     f_1    f_2    f_3    f_4    f_5
 x001f     1    0      0      0      0
 x0883g    1    0      0      0      0
 x8834c    2    0      0      0      0
 x8832d    3    0      0      0      0
" 
| multikv | eval total=0
| foreach f_* 
    [ eval total=total + '&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'] 
| where total &amp;gt; 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 17:09:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441701#M77007</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-23T17:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter the following data set using a wildcard field name and greater than filter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441702#M77008</link>
      <description>&lt;P&gt;Thanks for the response!  The problem is that it's adding up all the values which is &lt;STRONG&gt;NOT&lt;/STRONG&gt; what I want.  I just want to iterate through each of the f_* fields, see if the value for each of those fields is &amp;gt; 1 (independent of one another) and print those rows if any of the f_* have a value &amp;gt; 1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:44:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441702#M77008</guid>
      <dc:creator>splunker1981</dc:creator>
      <dc:date>2020-09-29T21:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter the following data set using a wildcard field name and greater than filter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441703#M77009</link>
      <description>&lt;P&gt;@splunker1981&lt;/P&gt;

&lt;P&gt;Can you please try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;YOUR_SEARCH | eval status=0
 | foreach f_* 
     [ eval status=if('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' &amp;gt; 1 AND status==0,1,status) ] | where status=1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Sample:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
 | eval _raw="
  c_1     f_1    f_2    f_3    f_4    f_5
  x001f     1    0      0      0      0
  x0883g    1    0      0      0      0
  x8834c    2    0      0      0      0
  x8832d    3    0      0      0      0
 " 
 | multikv | eval status=0
 | foreach f_* 
     [ eval status=if('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' &amp;gt; 1 AND status==0,1,status) ] | where status=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Oct 2018 18:07:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441703#M77009</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-23T18:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter the following data set using a wildcard field name and greater than filter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441704#M77010</link>
      <description>&lt;P&gt;Still not working when I run against my data. I did notice that using your command I get the desired results.  when I specifically filter using |search for the 10 results that should match, then the search works.  But if I remember the |where I only get 1 match....&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 19:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441704#M77010</guid>
      <dc:creator>splunker1981</dc:creator>
      <dc:date>2018-10-23T19:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter the following data set using a wildcard field name and greater than filter?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441705#M77011</link>
      <description>&lt;P&gt;@splunker1981&lt;/P&gt;

&lt;P&gt;Apology for a delay in reply.  Can you please share more information regarding your search and samples?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 16:00:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-the-following-data-set-using-a-wildcard-field/m-p/441705#M77011</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-30T16:00:30Z</dc:date>
    </item>
  </channel>
</rss>

