<?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 get distinct values of one field by another field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-distinct-values-of-one-field-by-another-field/m-p/111209#M29137</link>
    <description>&lt;P&gt;the below search will give me distinct count of one field by another field&lt;/P&gt;

&lt;P&gt;some search | stats dc(field1) by field2&lt;/P&gt;

&lt;P&gt;but how would I get the distinct values for field1 by field2&lt;/P&gt;

&lt;P&gt;so i want something like below:&lt;/P&gt;

&lt;P&gt;some search | stats distinct(field1) by field2&lt;/P&gt;</description>
    <pubDate>Thu, 04 Sep 2014 14:02:04 GMT</pubDate>
    <dc:creator>sridamg</dc:creator>
    <dc:date>2014-09-04T14:02:04Z</dc:date>
    <item>
      <title>How to get distinct values of one field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-distinct-values-of-one-field-by-another-field/m-p/111209#M29137</link>
      <description>&lt;P&gt;the below search will give me distinct count of one field by another field&lt;/P&gt;

&lt;P&gt;some search | stats dc(field1) by field2&lt;/P&gt;

&lt;P&gt;but how would I get the distinct values for field1 by field2&lt;/P&gt;

&lt;P&gt;so i want something like below:&lt;/P&gt;

&lt;P&gt;some search | stats distinct(field1) by field2&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2014 14:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-distinct-values-of-one-field-by-another-field/m-p/111209#M29137</guid>
      <dc:creator>sridamg</dc:creator>
      <dc:date>2014-09-04T14:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to get distinct values of one field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-distinct-values-of-one-field-by-another-field/m-p/111210#M29138</link>
      <description>&lt;P&gt;Hi sridamg,&lt;/P&gt;

&lt;P&gt;try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some search | stats values(field1) by field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;see the docs for more information &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/CommonStatsFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 04 Sep 2014 14:06:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-distinct-values-of-one-field-by-another-field/m-p/111210#M29138</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-09-04T14:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get distinct values of one field by another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-distinct-values-of-one-field-by-another-field/m-p/111211#M29139</link>
      <description>&lt;P&gt;Check if this helps..&lt;/P&gt;

&lt;PRE&gt;
... | dedup field1, field2 | stats list(field1) by field2
&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Sep 2014 14:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-distinct-values-of-one-field-by-another-field/m-p/111211#M29139</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2014-09-04T14:08:48Z</dc:date>
    </item>
  </channel>
</rss>

