<?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 How to create search to return rows in table based on count? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-return-rows-in-table-based-on-count/m-p/412814#M118964</link>
    <description>&lt;P&gt;I have a splunk query that forms table like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Time    Type    Msg
10/1/2019 0:00  1   xyz
10/2/2019 0:00  2   xyz
10/3/2019 0:00  3   xyz
10/4/2019 0:00  4   xyz
10/5/2019 0:00  1   xyz
10/6/2019 0:00  1   xyz
10/7/2019 0:00  2   xyz
10/8/2019 0:00  2   xyz
10/9/2019 0:00  3   xyz
10/10/2019 0:00 3   xyz
10/11/2019 0:00 4   xyz
10/12/2019 0:00 3   xyz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do i retain only the rows in the table where the count(type) is &amp;lt;3. So in this case i want the rows with type 4 to be removed because the count of events is less than 3.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Apr 2019 10:32:07 GMT</pubDate>
    <dc:creator>johnsasikumar</dc:creator>
    <dc:date>2019-04-22T10:32:07Z</dc:date>
    <item>
      <title>How to create search to return rows in table based on count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-return-rows-in-table-based-on-count/m-p/412814#M118964</link>
      <description>&lt;P&gt;I have a splunk query that forms table like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Time    Type    Msg
10/1/2019 0:00  1   xyz
10/2/2019 0:00  2   xyz
10/3/2019 0:00  3   xyz
10/4/2019 0:00  4   xyz
10/5/2019 0:00  1   xyz
10/6/2019 0:00  1   xyz
10/7/2019 0:00  2   xyz
10/8/2019 0:00  2   xyz
10/9/2019 0:00  3   xyz
10/10/2019 0:00 3   xyz
10/11/2019 0:00 4   xyz
10/12/2019 0:00 3   xyz
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do i retain only the rows in the table where the count(type) is &amp;lt;3. So in this case i want the rows with type 4 to be removed because the count of events is less than 3.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 10:32:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-return-rows-in-table-based-on-count/m-p/412814#M118964</guid>
      <dc:creator>johnsasikumar</dc:creator>
      <dc:date>2019-04-22T10:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create search to return rows in table based on count?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-return-rows-in-table-based-on-count/m-p/412815#M118965</link>
      <description>&lt;P&gt;Hi @johnsansikumar,&lt;BR /&gt;
    Please append below query after your existing query. (If you want to keep Type which has count less than 3, change where condition otherwise)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eventstats count by Type | where count&amp;lt;3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps!!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2019 12:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-to-return-rows-in-table-based-on-count/m-p/412815#M118965</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-04-22T12:44:04Z</dc:date>
    </item>
  </channel>
</rss>

