<?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: Union of two fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146963#M41064</link>
    <description>&lt;P&gt;It's not clear what you want the output to be.  This will show all the combinations of field1 and field2 in your data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | dedup field1 field2 | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 08 Dec 2014 14:57:20 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2014-12-08T14:57:20Z</dc:date>
    <item>
      <title>Union of two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146961#M41062</link>
      <description>&lt;P&gt;I have a query that produces results that has two columns :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| field1 | field2 | 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Field1 &amp;amp; Field2 have same domain, i.e. takes same set of values. I need to find out Union of the distinct values from both fields.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 12:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146961#M41062</guid>
      <dc:creator>mohitab</dc:creator>
      <dc:date>2014-12-08T12:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Union of two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146962#M41063</link>
      <description>&lt;P&gt;Something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...your search...
| stats values(field1) as f1values values(field2) as f2values 
| eval allvalues=mvdedup(mvappend(f1values,f2values))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;ought to work.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 14:55:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146962#M41063</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-12-08T14:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Union of two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146963#M41064</link>
      <description>&lt;P&gt;It's not clear what you want the output to be.  This will show all the combinations of field1 and field2 in your data.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search&amp;gt; | dedup field1 field2 | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Dec 2014 14:57:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146963#M41064</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-12-08T14:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Union of two fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146964#M41065</link>
      <description>&lt;P&gt;HI&lt;BR /&gt;
I propose this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Index=…  field1=*|table field1|append[search  index=…  field2=*|table field2]| eval allvalues=mvappend(field1,field2)|dedup allvalues |table field1 field2 allvalues |sort allvalues
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 12 Dec 2014 14:09:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Union-of-two-fields/m-p/146964#M41065</guid>
      <dc:creator>btt</dc:creator>
      <dc:date>2014-12-12T14:09:56Z</dc:date>
    </item>
  </channel>
</rss>

