<?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: Distinct count limit workaround in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-limit-workaround/m-p/18892#M177225</link>
    <description>&lt;P&gt;It will make it a bit less efficient but eventstats can make a first pass for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Eventstats avg(field2) as f2 avg(field3) as f3 | stats first(f2) as f2 first(f3) as f3 count by field1 | stats count first(f2) as "avg field2" first(f3) as "avg field3"  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 28 May 2011 16:05:56 GMT</pubDate>
    <dc:creator>sideview</dc:creator>
    <dc:date>2011-05-28T16:05:56Z</dc:date>
    <item>
      <title>Distinct count limit workaround</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-limit-workaround/m-p/18891#M177224</link>
      <description>&lt;P&gt;So I use the following workaround to get over the 100k hurdle with distinct_count(field1)&lt;/P&gt;

&lt;P&gt;....| stats count by field1 | stats count&lt;/P&gt;

&lt;P&gt;However I need to include other metrics (field2, field3) in the same search. For example&lt;/P&gt;

&lt;P&gt;....| stats avg(field2) avg(field3)&lt;/P&gt;

&lt;P&gt;How can I compute all the three metrics in one search?&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2011 13:34:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Distinct-count-limit-workaround/m-p/18891#M177224</guid>
      <dc:creator>nbharadwaj</dc:creator>
      <dc:date>2011-05-28T13:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count limit workaround</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-limit-workaround/m-p/18892#M177225</link>
      <description>&lt;P&gt;It will make it a bit less efficient but eventstats can make a first pass for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Eventstats avg(field2) as f2 avg(field3) as f3 | stats first(f2) as f2 first(f3) as f3 count by field1 | stats count first(f2) as "avg field2" first(f3) as "avg field3"  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 28 May 2011 16:05:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Distinct-count-limit-workaround/m-p/18892#M177225</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2011-05-28T16:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count limit workaround</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Distinct-count-limit-workaround/m-p/18893#M177226</link>
      <description>&lt;P&gt;I believe that limit has been removed as of version 4.2, so I think if you can upgrade, you can get around it easily that way.&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2011 00:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Distinct-count-limit-workaround/m-p/18893#M177226</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-05-30T00:43:04Z</dc:date>
    </item>
  </channel>
</rss>

