<?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 do you find details about results using the set command with a diff argument? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451465#M127833</link>
    <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=ABC sourcetype=PQRS) OR (index=DEF sourcetype=WXYZ)
| stats values(sourcetype) as sourcetype by x_orderno
| where mvcount(sourcetype)=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Feb 2019 03:03:56 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2019-02-12T03:03:56Z</dc:date>
    <item>
      <title>How do you find details about results using the set command with a diff argument?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451464#M127832</link>
      <description>&lt;P&gt;I am using two searches&lt;/P&gt;

&lt;P&gt;Search1    search 2&lt;BR /&gt;
1                   1&lt;BR /&gt;
2                   2&lt;BR /&gt;
3                   3&lt;BR /&gt;
5                   4&lt;/P&gt;

&lt;P&gt;Using set diff gives me the result. I don't want to use join.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;set diff [search index=ABC sourcetype=PQRS| stats count by x_orderno | fields - count]
[search index=DEF sourcetype=WXYZ| stats count by x_orderno | fields - count]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;x_orderno&lt;BR /&gt;
5&lt;BR /&gt;
4&lt;/P&gt;

&lt;P&gt;I want the result as &lt;BR /&gt;
x_orderno    sourcetype&lt;BR /&gt;
5                    PQRS&lt;BR /&gt;
4                    WXYZ&lt;/P&gt;

&lt;P&gt;Kindly suggest. &lt;/P&gt;

&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Mon, 11 Feb 2019 22:11:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451464#M127832</guid>
      <dc:creator>aa274t</dc:creator>
      <dc:date>2019-02-11T22:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you find details about results using the set command with a diff argument?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451465#M127833</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index=ABC sourcetype=PQRS) OR (index=DEF sourcetype=WXYZ)
| stats values(sourcetype) as sourcetype by x_orderno
| where mvcount(sourcetype)=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Feb 2019 03:03:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451465#M127833</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-02-12T03:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do you find details about results using the set command with a diff argument?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451466#M127834</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="sourcetype=PQRS,x_orderno=1 sourcetype=WXYZ,x_orderno=1 sourcetype=PQRS,x_orderno=2 sourcetype=WXYZ,x_orderno=2 sourcetype=PQRS,x_orderno=3 sourcetype=WXYZ,x_orderno=3 sourcetype=PQRS,x_orderno=5 sourcetype=WXYZ,x_orderno=4" 
| makemv raw 
| mvexpand raw 
| rename raw AS _raw 
| kv

| rename COMMENT AS "Everything above generates sample event data; everything below is your solution"

| stats dc(sourcetype) AS sourcetypeCount values(sourcetype) AS sourcetype BY x_orderno
| where sourcetypeCount==1
| table x_orderno sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Feb 2019 08:35:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451466#M127834</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-02-12T08:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do you find details about results using the set command with a diff argument?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451467#M127835</link>
      <description>&lt;P&gt;Awesome. Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Feb 2019 16:52:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-find-details-about-results-using-the-set-command-with/m-p/451467#M127835</guid>
      <dc:creator>aa274t</dc:creator>
      <dc:date>2019-02-12T16:52:11Z</dc:date>
    </item>
  </channel>
</rss>

