<?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: How to count events that are common or existing among multiple sourcetypes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285716#M86450</link>
    <description>&lt;P&gt;Try this to find transactions missing a step:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype=TICKET_OPENED OR sourcetype=TICKET_ACTIVITY  OR sourcetype=TICKET_CLOSED) |
stats count list(SOURCETYPE) as Types by TICKET_NUMBER | where count&amp;lt;3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or, specific to your question:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype=TICKET_OPENED OR sourcetype=TICKET_ACTIVITY  OR sourcetype=TICKET_CLOSED) |
stats dc(TICKET_NUMBER) as TICKET_NUMBERS by sourcetype  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 Sep 2016 20:16:25 GMT</pubDate>
    <dc:creator>twinspop</dc:creator>
    <dc:date>2016-09-15T20:16:25Z</dc:date>
    <item>
      <title>How to count events that are common or existing among multiple sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285714#M86448</link>
      <description>&lt;P&gt;Seeking help of Splunk Gurus.&lt;/P&gt;

&lt;P&gt;I have three sourcetypes : TICKET_OPENED, TICKET_ACTIVITY &amp;amp; TICKET_CLOSED. A common field among these three sourcetypes is TICKET_NUMBER.&lt;/P&gt;

&lt;P&gt;It is possible that a specific TICKET_NUMBER was opened (exists in TICKET_OPENED) but was not closed (does not exist in TICKET_CLOSED). My question is how do I count the number of distinct TICKET_NUMBER that exist in all of the three sourcetypes? &lt;/P&gt;

&lt;P&gt;PS - tried to look if this was previously asked but can't find any answer.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:01:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285714#M86448</guid>
      <dc:creator>christopheryu</dc:creator>
      <dc:date>2020-09-29T11:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to count events that are common or existing among multiple sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285715#M86449</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=xyz sourcetype=TICKET_OPENED OR sourcetype=TICKET_ACTIVITY OR sourcetype=TICKET_CLOSED | stats values(sourcetype) sourcetypes  dc(sourcetype) as count by TICKET_NUMBER | where count=3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2016 20:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285715#M86449</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-15T20:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to count events that are common or existing among multiple sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285716#M86450</link>
      <description>&lt;P&gt;Try this to find transactions missing a step:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype=TICKET_OPENED OR sourcetype=TICKET_ACTIVITY  OR sourcetype=TICKET_CLOSED) |
stats count list(SOURCETYPE) as Types by TICKET_NUMBER | where count&amp;lt;3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or, specific to your question:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(sourcetype=TICKET_OPENED OR sourcetype=TICKET_ACTIVITY  OR sourcetype=TICKET_CLOSED) |
stats dc(TICKET_NUMBER) as TICKET_NUMBERS by sourcetype  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2016 20:16:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285716#M86450</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-09-15T20:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to count events that are common or existing among multiple sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285717#M86451</link>
      <description>&lt;P&gt;removed "sourcetypes"  in the stats pipe and it's good to go, thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 15:59:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285717#M86451</guid>
      <dc:creator>christopheryu</dc:creator>
      <dc:date>2016-09-19T15:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to count events that are common or existing among multiple sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285718#M86452</link>
      <description>&lt;P&gt;that was meant to be &lt;CODE&gt;as sourcetypes&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 16:04:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285718#M86452</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-19T16:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to count events that are common or existing among multiple sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285719#M86453</link>
      <description>&lt;P&gt;both produce the same result that I am looking for. Thanks again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 16:17:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285719#M86453</guid>
      <dc:creator>christopheryu</dc:creator>
      <dc:date>2016-09-19T16:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to count events that are common or existing among multiple sourcetypes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285720#M86454</link>
      <description>&lt;P&gt;Thank you but not quite what I was looking for.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 16:24:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-events-that-are-common-or-existing-among-multiple/m-p/285720#M86454</guid>
      <dc:creator>christopheryu</dc:creator>
      <dc:date>2016-09-19T16:24:12Z</dc:date>
    </item>
  </channel>
</rss>

