<?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 find common and distinct data from two datasets? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676211#M55365</link>
    <description>&lt;P&gt;It looks like&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;has provided a good answer - It is probably best not to call out individuals when first posing a question; we are all volunteers here and you don't know when the requested volunteer is going to be available, and others may feel that they shouldn't answer when the question is directed to particular volunteers (do you not value others' contributions?)&lt;/P&gt;</description>
    <pubDate>Thu, 01 Feb 2024 09:44:51 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2024-02-01T09:44:51Z</dc:date>
    <item>
      <title>How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676189#M55360</link>
      <description>&lt;P&gt;Hi&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;&lt;P&gt;I have two datasets from two search queries. I need to fetch the common as well as distinct values from both the datasets in the final result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;TABLE border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64" height="20"&gt;Field1&lt;/TD&gt;&lt;TD width="64"&gt;Field2&lt;/TD&gt;&lt;TD width="64"&gt;Result&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&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Can you please help with the query?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 06:26:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676189#M55360</guid>
      <dc:creator>maverick27</dc:creator>
      <dc:date>2024-02-01T06:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676192#M55361</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/262674"&gt;@maverick27&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you could use eval coalesce, something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 OR index=index2
| eval new_field=coalesce(field1, field2)
| table new_field&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 06:57:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676192#M55361</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-02-01T06:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676197#M55364</link>
      <description>&lt;P&gt;And you have those results in multivalued fields? In separate result rows?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 07:11:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676197#M55364</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-02-01T07:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676211#M55365</link>
      <description>&lt;P&gt;It looks like&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;has provided a good answer - It is probably best not to call out individuals when first posing a question; we are all volunteers here and you don't know when the requested volunteer is going to be available, and others may feel that they shouldn't answer when the question is directed to particular volunteers (do you not value others' contributions?)&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 09:44:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676211#M55365</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-01T09:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676212#M55366</link>
      <description>&lt;P&gt;Totally agree. I value everyone's contribution and restricting my question only to a certain individual will only delay or prolong the process. Apologies for that. This won't be repeated. Let me try&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;'s solution and get back! Thanks guys!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 09:56:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676212#M55366</guid>
      <dc:creator>maverick27</dc:creator>
      <dc:date>2024-02-01T09:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676229#M55372</link>
      <description>&lt;P&gt;May be I wasn't clear with my requirement. Apologies guys!&lt;BR /&gt;&lt;BR /&gt;Let me give you an example as to what I'm trying to do.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1st search contains the following data:&lt;/P&gt;&lt;TABLE border="0" width="192" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64" height="20"&gt;Field1&lt;/TD&gt;&lt;TD width="64"&gt;DEPT&lt;/TD&gt;&lt;TD width="64"&gt;UID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;1&lt;/TD&gt;&lt;TD&gt;Accounts&lt;/TD&gt;&lt;TD&gt;AA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;3&lt;/TD&gt;&lt;TD&gt;HR&lt;/TD&gt;&lt;TD&gt;CC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;5&lt;/TD&gt;&lt;TD&gt;Ops&lt;/TD&gt;&lt;TD&gt;EE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;7&lt;/TD&gt;&lt;TD&gt;Tech&lt;/TD&gt;&lt;TD&gt;GG&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;9&lt;/TD&gt;&lt;TD&gt;Ops&lt;/TD&gt;&lt;TD&gt;II&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10&lt;/TD&gt;&lt;TD&gt;Tech&lt;/TD&gt;&lt;TD&gt;JJ&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;11&lt;/TD&gt;&lt;TD&gt;HR&lt;/TD&gt;&lt;TD&gt;KK&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2nd search contains the following data:&lt;/P&gt;&lt;TABLE border="0" width="128" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64" height="20"&gt;Field2&lt;/TD&gt;&lt;TD width="64"&gt;REGION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;4&lt;/TD&gt;&lt;TD&gt;TY&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;6&lt;/TD&gt;&lt;TD&gt;HK&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;8&lt;/TD&gt;&lt;TD&gt;AS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;10&lt;/TD&gt;&lt;TD&gt;EU&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;11&lt;/TD&gt;&lt;TD&gt;AS&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I need to get common as well as disctinct rows from both the tables as shown below:&lt;/P&gt;&lt;TABLE border="0" width="256" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64" height="20"&gt;Result&lt;/TD&gt;&lt;TD width="64"&gt;DEPT&lt;/TD&gt;&lt;TD width="64"&gt;UID&lt;/TD&gt;&lt;TD width="64"&gt;REGION&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;1&lt;/TD&gt;&lt;TD&gt;Accounts&lt;/TD&gt;&lt;TD&gt;AA&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;NA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt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D&gt;&lt;TD&gt;HR&lt;/TD&gt;&lt;TD&gt;KK&lt;/TD&gt;&lt;TD&gt;AS&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 12:32:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676229#M55372</guid>
      <dc:creator>maverick27</dc:creator>
      <dc:date>2024-02-01T12:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676242#M55374</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/262674"&gt;@maverick27&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you have to expend my search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 OR index=index2
| eval Result=coalesce(field1, field2)
| table Result DEPT UID REGION&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 13:42:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676242#M55374</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-02-01T13:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676243#M55375</link>
      <description>&lt;P&gt;More like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=index1 OR index=index2
| eval Result=coalesce(field1, field2)
| stats values(*) as * by Result&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 01 Feb 2024 13:44:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676243#M55375</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-01T13:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to find common and distinct data from two datasets?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676246#M55376</link>
      <description>&lt;PRE&gt;(search1) OR (search2)&lt;BR /&gt;| stats values(*) as * by Field1&lt;/PRE&gt;&lt;P&gt;If they are bigger complex searches, you'd need to use append instead of simple OR for conditions but then you have to watch for limits for subsearches.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 13:51:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-find-common-and-distinct-data-from-two-datasets/m-p/676246#M55376</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-02-01T13:51:13Z</dc:date>
    </item>
  </channel>
</rss>

