<?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 Filter a chart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Filter-a-chart/m-p/59015#M14537</link>
    <description>&lt;P&gt;Hello -&lt;/P&gt;

&lt;P&gt;A version of the following query gives me just what I'm looking for (although a much larger chart):&lt;/P&gt;

&lt;P&gt;index="foo" search_text | chart count by result version&lt;/P&gt;

&lt;P&gt;returns something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    |v1.1|v1.2|v1.3|v1.4|
| A |1823| 283|  12| 941|
| B | 923|  23|   2| 193|
| C | 810|  74|   1| 324|
| D |1192|   2|   6|  90|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The one thing I still need to do is to filter out entire columns based on an arbitrary value (say, the count of A for a particular version is less than 100). For example, v1.3 has only 12 instances of result 'A', so this chart should only show columns for v1.1, v1.2, and v1.4.&lt;/P&gt;

&lt;P&gt;Any tips?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2011 05:36:35 GMT</pubDate>
    <dc:creator>gbarwis</dc:creator>
    <dc:date>2011-03-15T05:36:35Z</dc:date>
    <item>
      <title>Filter a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-a-chart/m-p/59015#M14537</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;

&lt;P&gt;A version of the following query gives me just what I'm looking for (although a much larger chart):&lt;/P&gt;

&lt;P&gt;index="foo" search_text | chart count by result version&lt;/P&gt;

&lt;P&gt;returns something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    |v1.1|v1.2|v1.3|v1.4|
| A |1823| 283|  12| 941|
| B | 923|  23|   2| 193|
| C | 810|  74|   1| 324|
| D |1192|   2|   6|  90|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The one thing I still need to do is to filter out entire columns based on an arbitrary value (say, the count of A for a particular version is less than 100). For example, v1.3 has only 12 instances of result 'A', so this chart should only show columns for v1.1, v1.2, and v1.4.&lt;/P&gt;

&lt;P&gt;Any tips?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2011 05:36:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-a-chart/m-p/59015#M14537</guid>
      <dc:creator>gbarwis</dc:creator>
      <dc:date>2011-03-15T05:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-a-chart/m-p/59016#M14538</link>
      <description>&lt;P&gt;Assuming you want this procedure to be fully automated, you can do something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo search_text
| stats count by result version
| eventstats sum(count) as version_count by version
| search version_count &amp;gt; 100
| chart sum(count) by result version
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This filters out columns whose column sum is &amp;gt; 100.&lt;/P&gt;

&lt;P&gt;If you really mean just count of result=A, version=* &amp;gt; 100, then it's better to use a subsearch:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo search_text [search index=foo search_text result=A
                      | stats count by version
                      | search count &amp;gt; 100
                      | fields version
                      ]
| chart count by result version
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Mar 2011 11:21:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-a-chart/m-p/59016#M14538</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2011-03-15T11:21:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filter a chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Filter-a-chart/m-p/59017#M14539</link>
      <description>&lt;P&gt;This worked perfectly, thanks! I'd previously tried the subsearch approach, but since I'm actually searching through a few hundred million records, the subsearch would always time out; the eventstats approach was just the trick.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2011 04:55:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Filter-a-chart/m-p/59017#M14539</guid>
      <dc:creator>gbarwis</dc:creator>
      <dc:date>2011-03-16T04:55:39Z</dc:date>
    </item>
  </channel>
</rss>

