<?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 exclude invoices with ID = 350 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478427#M134178</link>
    <description>&lt;P&gt;Hello richgalloway,&lt;/P&gt;

&lt;P&gt;thanks for your answer. &lt;/P&gt;

&lt;P&gt;if i remove 350 in the where clause, i will have this : &lt;BR /&gt;
128 &lt;STRONG&gt;261313851&lt;/STRONG&gt; screen&lt;BR /&gt;
307 538601320 aquarium&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;but&lt;/STRONG&gt; this &lt;STRONG&gt;261313851&lt;/STRONG&gt; invoice is not correct for me because it's contains too id = 350 so i want just : &lt;BR /&gt;
307 538601320 aquarium&lt;BR /&gt;
.......&lt;/P&gt;

&lt;P&gt;How can i do please ? &lt;/P&gt;

&lt;P&gt;Thank you very much for your help and your advice. &lt;/P&gt;</description>
    <pubDate>Tue, 21 Apr 2020 07:32:22 GMT</pubDate>
    <dc:creator>vita86</dc:creator>
    <dc:date>2020-04-21T07:32:22Z</dc:date>
    <item>
      <title>How to exclude invoices with ID = 350</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478425#M134176</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I'm training on splunk, I need help.&lt;/P&gt;

&lt;P&gt;I have an invoice list, extracted via this query : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="*_invoice" 
| where in (id,350,128,307)
| table id invoice ProductType 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Result : &lt;BR /&gt;
&lt;STRONG&gt;350 261313851 phone &lt;BR /&gt;
128 261313851 screen&lt;BR /&gt;
307 538601320 aquarium&lt;/STRONG&gt; &lt;BR /&gt;
.....&lt;/P&gt;

&lt;P&gt;But I have to exclude invoice number &lt;STRONG&gt;261313851&lt;/STRONG&gt; because it contains id = 350.&lt;/P&gt;

&lt;P&gt;How can I do please ? foreach and condition if ? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| Foreach invoice [eval status_invoice=if(id!=350, "ok", "ko")] 
| where status_invoice= "ok"? 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you in advance for your help. &lt;/P&gt;

&lt;P&gt;Regards, &lt;BR /&gt;
vita86&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 20:00:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478425#M134176</guid>
      <dc:creator>vita86</dc:creator>
      <dc:date>2020-04-20T20:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude invoices with ID = 350</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478426#M134177</link>
      <description>&lt;P&gt;If you take 350 out of the &lt;CODE&gt;where&lt;/CODE&gt; clause then those IDs will not be included.&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;foreach&lt;/CODE&gt; command iterates over the fields in a single event.  Otherwise, commands iterate over each event returned by the previous command.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 20:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478426#M134177</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-20T20:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude invoices with ID = 350</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478427#M134178</link>
      <description>&lt;P&gt;Hello richgalloway,&lt;/P&gt;

&lt;P&gt;thanks for your answer. &lt;/P&gt;

&lt;P&gt;if i remove 350 in the where clause, i will have this : &lt;BR /&gt;
128 &lt;STRONG&gt;261313851&lt;/STRONG&gt; screen&lt;BR /&gt;
307 538601320 aquarium&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;but&lt;/STRONG&gt; this &lt;STRONG&gt;261313851&lt;/STRONG&gt; invoice is not correct for me because it's contains too id = 350 so i want just : &lt;BR /&gt;
307 538601320 aquarium&lt;BR /&gt;
.......&lt;/P&gt;

&lt;P&gt;How can i do please ? &lt;/P&gt;

&lt;P&gt;Thank you very much for your help and your advice. &lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 07:32:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478427#M134178</guid>
      <dc:creator>vita86</dc:creator>
      <dc:date>2020-04-21T07:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude invoices with ID = 350</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478428#M134179</link>
      <description>&lt;P&gt;Thanks for clarifying the problem.  See if this helps.  It groups the events by invoice then filters out those invoices that have id=350.  Then the group is broken up and the results displayed.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="*_invoice" (id=350 OR id=128 OR id=307)
| stats values(*) as * by invoice
`comment("mvfind returns NULL if '350' is not found")`
| where isnull(mvfind(id, "350"))
| mvexpand id
| table id invoice ProductType
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Apr 2020 13:13:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478428#M134179</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-21T13:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude invoices with ID = 350</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478429#M134180</link>
      <description>&lt;P&gt;Thank you very much for your help and your explanation.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 14:12:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478429#M134180</guid>
      <dc:creator>vita86</dc:creator>
      <dc:date>2020-04-22T14:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to exclude invoices with ID = 350</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478430#M134181</link>
      <description>&lt;P&gt;If your problem is resolved then please accept the answer to help future readers.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 12:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-exclude-invoices-with-ID-350/m-p/478430#M134181</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-04-23T12:05:54Z</dc:date>
    </item>
  </channel>
</rss>

