<?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: Get distinct count from different sources in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-distinct-count-from-different-sources/m-p/681980#M233025</link>
    <description>&lt;P&gt;Assuming that the fields only exist in their respective sourcetypes, you could try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=source1 OR sourcetype=source2 OR sourcetype=source3
| eval userlist=coalesce(userlist, line.userlist, line.subject)
| stats dc(userlist)&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 26 Mar 2024 11:14:48 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-03-26T11:14:48Z</dc:date>
    <item>
      <title>Get distinct count from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-distinct-count-from-different-sources/m-p/681974#M233024</link>
      <description>&lt;P&gt;I have 3 different sources of the same filed. I want to aggregate all the 3 sources and get the distinct count of the field&lt;/P&gt;&lt;P&gt;eg.&lt;/P&gt;&lt;P&gt;sourcetype=source1 | stats dc(userlist)&lt;/P&gt;&lt;P&gt;sourcetype=source2 | stats dc(line.userlist)&lt;/P&gt;&lt;P&gt;sourcetype=source3 | stats dc(line.subject)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here userlist, line.userlist, line.subject are all the same attributes but being logged differently. Now I want to get the dc of userlist+line.userlist+line.subject. Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 10:11:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-distinct-count-from-different-sources/m-p/681974#M233024</guid>
      <dc:creator>raghubankapur</dc:creator>
      <dc:date>2024-03-26T10:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct count from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-distinct-count-from-different-sources/m-p/681980#M233025</link>
      <description>&lt;P&gt;Assuming that the fields only exist in their respective sourcetypes, you could try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=source1 OR sourcetype=source2 OR sourcetype=source3
| eval userlist=coalesce(userlist, line.userlist, line.subject)
| stats dc(userlist)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 26 Mar 2024 11:14:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-distinct-count-from-different-sources/m-p/681980#M233025</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-03-26T11:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Get distinct count from different sources</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-distinct-count-from-different-sources/m-p/681988#M233027</link>
      <description>&lt;P&gt;This works well&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 12:15:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-distinct-count-from-different-sources/m-p/681988#M233027</guid>
      <dc:creator>raghubankapur</dc:creator>
      <dc:date>2024-03-26T12:15:12Z</dc:date>
    </item>
  </channel>
</rss>

