<?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 count entries used in two sources in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324446#M163390</link>
    <description>&lt;P&gt;I've two sources with a Name-Town-Phone list. Now I like to count the entries mentioned in both sources.&lt;BR /&gt;
For example: Tom and Ben are mentioned in source I and II so I like the result count(mentioned_in_both)=&amp;gt;2&lt;/P&gt;

&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 17:46:59 GMT</pubDate>
    <dc:creator>LH_SPLUNK</dc:creator>
    <dc:date>2020-09-29T17:46:59Z</dc:date>
    <item>
      <title>count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324446#M163390</link>
      <description>&lt;P&gt;I've two sources with a Name-Town-Phone list. Now I like to count the entries mentioned in both sources.&lt;BR /&gt;
For example: Tom and Ben are mentioned in source I and II so I like the result count(mentioned_in_both)=&amp;gt;2&lt;/P&gt;

&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:46:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324446#M163390</guid>
      <dc:creator>LH_SPLUNK</dc:creator>
      <dc:date>2020-09-29T17:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324447#M163391</link>
      <description>&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.1/SearchReference/Append"&gt;Append&lt;/A&gt; the two sets of data and then use &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.1/SearchReference/Eventstats"&gt;eventstats&lt;/A&gt; to count occurrences, then filter for count.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 15:02:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324447#M163391</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-01-23T15:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324448#M163392</link>
      <description>&lt;P&gt;You can do something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your_index&amp;gt; source=source1 OR source=source2 | stats count by source | where count&amp;gt;=2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you have both the sources in different indexes then write &lt;CODE&gt;index=index1 OR index=index2&lt;/CODE&gt; instead of &lt;CODE&gt;index=&amp;lt;your_index&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Let me know if this helps !!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 15:46:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324448#M163392</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-23T15:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324449#M163393</link>
      <description>&lt;P&gt;YOu would need to share your current queries using which you can search both source individually to get better answer. With information available, you can do like (assuming there are common fields between them):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(base search source1) OR (base search source2) 
| stats count dc(source) as sources by Name Town Phone
| where sources=2 AND count&amp;gt;=2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Jan 2018 15:50:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324449#M163393</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-01-23T15:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324450#M163394</link>
      <description>&lt;P&gt;This is assuming the data is in lookups (since you're referring to "list"). If the data is in an index, write a search that returns data from both sets (as explained in the answers of somesoni2 and mayurr98 and then again count occurrences.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2018 16:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324450#M163394</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-01-23T16:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324451#M163395</link>
      <description>&lt;P&gt;Hey, this isn't a useful solution. I need a number of entries which are in BOTH sources.&lt;BR /&gt;
  e.g. Tom and Ben are in both lists, so I need the result 2. &lt;BR /&gt;
(The index is the same)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 07:18:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324451#M163395</guid>
      <dc:creator>LH_SPLUNK</dc:creator>
      <dc:date>2018-01-24T07:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324452#M163396</link>
      <description>&lt;P&gt;There is no table/statistic available.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 07:19:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324452#M163396</guid>
      <dc:creator>LH_SPLUNK</dc:creator>
      <dc:date>2018-01-24T07:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324453#M163397</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your_index&amp;gt; source=source1 OR source=source2 | stats dc(source) as source_count by &amp;lt;common_field&amp;gt; | where source_count=2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will give you all the values in the common_field those are present in both the sources/lists.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2018 07:28:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324453#M163397</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-24T07:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: count entries used in two sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324454#M163398</link>
      <description>&lt;P&gt;index= source=source1 OR source=source2 | stats dc(source) as source_count by  | where source_count=2 | stats count by ...&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-entries-used-in-two-sources/m-p/324454#M163398</guid>
      <dc:creator>LH_SPLUNK</dc:creator>
      <dc:date>2020-09-29T17:50:38Z</dc:date>
    </item>
  </channel>
</rss>

