<?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: Compare 2 datasets in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557468#M158323</link>
    <description>&lt;P&gt;You will need to provide a little more information on the fields in your data you are looking to compare and what output you will expect to see at the end.&lt;/P&gt;&lt;P&gt;Can you provide an example?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Jun 2021 21:36:50 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2021-06-28T21:36:50Z</dc:date>
    <item>
      <title>Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557467#M158322</link>
      <description>&lt;DIV&gt;I have 2 data sets&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;index=support source=sites earliest=-1d@d latest=-0d@d&lt;BR /&gt;index=support source=sites earliest=-0d@d latest=now&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;I want to pull out that data which is changed in data set 2 as compared to data set 1&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 28 Jun 2021 21:25:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557467#M158322</guid>
      <dc:creator>ppanchal</dc:creator>
      <dc:date>2021-06-28T21:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557468#M158323</link>
      <description>&lt;P&gt;You will need to provide a little more information on the fields in your data you are looking to compare and what output you will expect to see at the end.&lt;/P&gt;&lt;P&gt;Can you provide an example?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 21:36:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557468#M158323</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-06-28T21:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557473#M158325</link>
      <description>&lt;P&gt;We have a field called Site_id which is a string.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Set 1 -&amp;nbsp;Site id = a1, a2, a3&lt;/P&gt;&lt;P&gt;Set 2 -&amp;nbsp;Site id = a2, a3, a4&lt;/P&gt;&lt;P&gt;My result should be Site id = a1, a4&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 21:48:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557473#M158325</guid>
      <dc:creator>ppanchal</dc:creator>
      <dc:date>2021-06-28T21:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557478#M158327</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=support source=sites earliest=-1d@d latest=-0d@d) OR 
(index=support source=sites earliest=-0d@d latest=now)
| bin _time span=1d@d
| stats count by _time Site_id
| stats values(_time) as _time by Site_id
| where mvcount(_time) = 1&lt;/LI-CODE&gt;&lt;P&gt;This groups the sites by date then counts the dates that site has been found and only looks for results where there is only one time value.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 22:00:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557478#M158327</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-06-28T22:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557680#M158381</link>
      <description>&lt;P&gt;This did not work, I tried below,&lt;/P&gt;&lt;P&gt;(index=support source=sites SITE_ID=S028 AND SITE_ID=S056 earliest=-1d@d latest=-0d@d) OR (index=support source=sites SITE_ID=S028 AND SITE_ID=S056 AND SITE_ID=S10 earliest=-0d@d latest=now)&lt;BR /&gt;| bin _time span=1d@d | stats count by _time SITE_ID | stats values(_time) as _time by SITE_ID | where mvcount(_time) = 1&lt;/P&gt;&lt;P&gt;It gives me 0 events/results. Can you please help?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 20:13:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557680#M158381</guid>
      <dc:creator>ppanchal</dc:creator>
      <dc:date>2021-06-29T20:13:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557730#M158407</link>
      <description>&lt;P&gt;Can you take out the 'where' clause, so you can see what results you get back. If you replace the where clause with&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval date=strftime(_time, "%F")&lt;/LI-CODE&gt;&lt;P&gt;then you will get a date column, where it shows you the dates of data it has seen for those sites.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2021 02:00:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/557730#M158407</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-06-30T02:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/558452#M158639</link>
      <description>&lt;P&gt;No this will not help me. I have like 500-600 site IDs. I will have to go through the entire list to see the IDs are present for both the dates.&lt;/P&gt;&lt;P&gt;Any other solution?&lt;/P&gt;&lt;P&gt;I only want to find the sites ids that&amp;nbsp; has only 1 occurrence.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 16:43:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/558452#M158639</guid>
      <dc:creator>ppanchal</dc:creator>
      <dc:date>2021-07-06T16:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/558458#M158640</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/204504"&gt;@ppanchal&lt;/a&gt;&amp;nbsp;See if the below logic helps!!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval site="1,2,3"
| makemv site delim=","
| mvexpand site
| appendcols
[| makeresults
| eval site1="4,3,5"
| makemv site1 delim=","
| mvexpand site1]
| eventstats values(site1) as site2
| eval val=if(in(site,site2),"YES","NO")

============================

index=support source=sites earliest=-1d@d latest=-0d@d | rename site as site1 | table site1 | appendcols [search index=support source=sites earliest=-0d@d latest=now | rename site as site2 | table site2]
|eventstats values(site2) as site2_values | eval present_in_both=if(in(site1,site2_values),"YES","NO")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 06 Jul 2021 17:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/558458#M158640</guid>
      <dc:creator>sanjeev543</dc:creator>
      <dc:date>2021-07-06T17:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Compare 2 datasets</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/558997#M158808</link>
      <description>&lt;P&gt;It shouldn't matter how many you have - the point is to see what your search is returning so the first line would be enough to investigate - it might be that your time constraints in the query are not working in your environment in that 'now' is not giving you any window between &lt;A href="mailto:-0d@d" target="_blank"&gt;-0d@d&lt;/A&gt;&lt;/P&gt;&lt;P&gt;you could change the time constraints to&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=support source=sites earliest=-2d@d latest=-1d@d) OR 
(index=support source=sites earliest=-1d@d latest=@d)&lt;/LI-CODE&gt;&lt;P&gt;which will compare two days ago to yesterday&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jul 2021 23:10:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Compare-2-datasets/m-p/558997#M158808</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-07-11T23:10:53Z</dc:date>
    </item>
  </channel>
</rss>

