<?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 use stats count where OR stats count where on different fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428731#M168459</link>
    <description>&lt;P&gt;Be sure to &lt;CODE&gt;UpVote&lt;/CODE&gt; helpful answers even if you can't &lt;CODE&gt;Accept&lt;/CODE&gt; one of them.&lt;/P&gt;</description>
    <pubDate>Sun, 15 Jul 2018 13:30:42 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2018-07-15T13:30:42Z</dc:date>
    <item>
      <title>How to use stats count where OR stats count where on different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428725#M168453</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;

&lt;P&gt;I'm pretty new to Splunk.  I have to create a search/alert and am having trouble with the syntax.  This is what I'm trying to do:&lt;BR /&gt;
index=myindex field1="AU" field2="L"&lt;BR /&gt;
|stats count by field3 where count &amp;gt;5 OR count by field4 where count&amp;gt;2&lt;/P&gt;

&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 01:39:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428725#M168453</guid>
      <dc:creator>vwilson3</dc:creator>
      <dc:date>2018-07-07T01:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use stats count where OR stats count where on different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428726#M168454</link>
      <description>&lt;P&gt;The &lt;CODE&gt;stats&lt;/CODE&gt; command does not have a &lt;CODE&gt;where&lt;/CODE&gt; clause and only has a single &lt;CODE&gt;by&lt;/CODE&gt; clause.&lt;/P&gt;

&lt;P&gt;What are you trying to accomplish with your sample query?  Once you explain what results you want to get, we may be able to help you get them.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jul 2018 01:17:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428726#M168454</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-07-08T01:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use stats count where OR stats count where on different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428727#M168455</link>
      <description>&lt;P&gt;Hi @vwilson3,&lt;/P&gt;

&lt;P&gt;Probably you are looking for something similar?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex field1="AU" field2="L"
|stats dc(field3) as field3,dc(field4) as field4 |where (field3&amp;gt;5 OR field4&amp;gt;2)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Jul 2018 12:50:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428727#M168455</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-07-08T12:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use stats count where OR stats count where on different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428728#M168456</link>
      <description>&lt;P&gt;Maybe this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex field1="AU" field2="L"
| fillnull value="N/A" field3 field4
|stats count BY field3 field4
| multireport
[ stats sum(count) AS f3count BY field3 | where f3count&amp;gt;5]
[ stats sum(count) AS f4count BY field4 | where f4count&amp;gt;2]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Jul 2018 17:49:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428728#M168456</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-08T17:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use stats count where OR stats count where on different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428729#M168457</link>
      <description>&lt;P&gt;I am trying to find events that match field1 and field2, and match field3 if there are more than 5 or match field4 if there are more than 2.&lt;/P&gt;

&lt;P&gt;Thanks for the info.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2018 00:54:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428729#M168457</guid>
      <dc:creator>vwilson3</dc:creator>
      <dc:date>2018-07-11T00:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use stats count where OR stats count where on different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428730#M168458</link>
      <description>&lt;P&gt;Still working on this.  Thank you for your suggestions!&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jul 2018 17:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428730#M168458</guid>
      <dc:creator>vwilson3</dc:creator>
      <dc:date>2018-07-14T17:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use stats count where OR stats count where on different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428731#M168459</link>
      <description>&lt;P&gt;Be sure to &lt;CODE&gt;UpVote&lt;/CODE&gt; helpful answers even if you can't &lt;CODE&gt;Accept&lt;/CODE&gt; one of them.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jul 2018 13:30:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428731#M168459</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-15T13:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use stats count where OR stats count where on different fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428732#M168460</link>
      <description>&lt;P&gt;Thank you, woodcock!  I appreciate the guidance.  I hope I did it correctly.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 13:02:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-stats-count-where-OR-stats-count-where-on-different/m-p/428732#M168460</guid>
      <dc:creator>vwilson3</dc:creator>
      <dc:date>2018-07-16T13:02:10Z</dc:date>
    </item>
  </channel>
</rss>

