<?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 Total counts of one field based on distinct counts of another field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280603#M84680</link>
    <description>&lt;P&gt;This seems like it should be simple, but I'm new to Splunk and can't figure it out.  I have one field dc(Name) that corresponds with another field that has multiple values.&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;Name:                         Values:&lt;BR /&gt;
PC1                              Value1, Value2, Value3&lt;BR /&gt;
PC2                              Value1, Value2, Value4&lt;BR /&gt;
PC3                              Value1, Value2&lt;/P&gt;

&lt;P&gt;I need to get a count of the &lt;STRONG&gt;total number of distinct "Values" for distinct "Names"&lt;/STRONG&gt;.  So, the sum of 3 values for PC1, 3 for PC2, 2 for PC3 etc...Keep i mind this comes from a daily DB input so the events will duplicate after every import.  I looked into a few different commands but they don't seem to be working for this task.&lt;/P&gt;

&lt;P&gt;Thanks for any help.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2015 03:12:48 GMT</pubDate>
    <dc:creator>jawebb</dc:creator>
    <dc:date>2015-10-15T03:12:48Z</dc:date>
    <item>
      <title>Total counts of one field based on distinct counts of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280603#M84680</link>
      <description>&lt;P&gt;This seems like it should be simple, but I'm new to Splunk and can't figure it out.  I have one field dc(Name) that corresponds with another field that has multiple values.&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;Name:                         Values:&lt;BR /&gt;
PC1                              Value1, Value2, Value3&lt;BR /&gt;
PC2                              Value1, Value2, Value4&lt;BR /&gt;
PC3                              Value1, Value2&lt;/P&gt;

&lt;P&gt;I need to get a count of the &lt;STRONG&gt;total number of distinct "Values" for distinct "Names"&lt;/STRONG&gt;.  So, the sum of 3 values for PC1, 3 for PC2, 2 for PC3 etc...Keep i mind this comes from a daily DB input so the events will duplicate after every import.  I looked into a few different commands but they don't seem to be working for this task.&lt;/P&gt;

&lt;P&gt;Thanks for any help.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 03:12:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280603#M84680</guid>
      <dc:creator>jawebb</dc:creator>
      <dc:date>2015-10-15T03:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: Total counts of one field based on distinct counts of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280604#M84681</link>
      <description>&lt;P&gt;Is the field Values a multivalued field OR it's a single string with multiple values separated by comma? What is your current search?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 03:31:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280604#M84681</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-10-15T03:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Total counts of one field based on distinct counts of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280605#M84682</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats values(Values) AS Values by Name | eval numValues=mvcount(Values)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Oct 2015 06:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280605#M84682</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-10-15T06:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Total counts of one field based on distinct counts of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280606#M84683</link>
      <description>&lt;P&gt;Thanks!  That seemed to do the trick.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 13:30:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280606#M84683</guid>
      <dc:creator>jawebb</dc:creator>
      <dc:date>2015-10-15T13:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Total counts of one field based on distinct counts of another field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280607#M84684</link>
      <description>&lt;P&gt;Do not forget to close the question by accepting the answer.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:34:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-counts-of-one-field-based-on-distinct-counts-of-another/m-p/280607#M84684</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-10-15T14:34:49Z</dc:date>
    </item>
  </channel>
</rss>

