<?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 compare and show the difference between two mv fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377121#M170389</link>
    <description>&lt;P&gt;I am pretty sure that this only works for simple cases so be sure to evaluate deeply.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2019 20:12:25 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-07-11T20:12:25Z</dc:date>
    <item>
      <title>How to compare and show the difference between two mv fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377117#M170385</link>
      <description>&lt;P&gt;I have two mvfields and am looking for a way to show the difference (the missing fields)  when comparing mvfield req to mvfield res&lt;/P&gt;

&lt;P&gt;req&lt;BR /&gt;
34&lt;BR /&gt;
228&lt;BR /&gt;
12558&lt;/P&gt;

&lt;P&gt;res&lt;BR /&gt;
34&lt;BR /&gt;
228&lt;/P&gt;

&lt;P&gt;how do I create a third field that would contain 12558?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 14:17:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377117#M170385</guid>
      <dc:creator>taynord</dc:creator>
      <dc:date>2019-07-11T14:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare and show the difference between two mv fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377118#M170386</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Give a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval req="34,228,12558" 
| appendcols 
    [| makeresults 
    | eval res="228,34,4" 
        ] 
| eval diff = req.",".res 
| makemv delim="," diff 
| stats count,list(req) as req,list(res) as res by diff 
| where count =1 
| mvcombine diff delim="," 
| nomv diff 
| table req,res,diff
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jul 2019 15:42:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377118#M170386</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-11T15:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare and show the difference between two mv fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377119#M170387</link>
      <description>&lt;P&gt;See here (don't forget to &lt;CODE&gt;UpVote&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/740480/how-to-compare-characters-in-two-fields-and-return.html"&gt;https://answers.splunk.com/answers/740480/how-to-compare-characters-in-two-fields-and-return.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/567851/how-can-i-compare-mvfields-and-get-a-diff.html"&gt;https://answers.splunk.com/answers/567851/how-can-i-compare-mvfields-and-get-a-diff.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 15:46:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377119#M170387</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-11T15:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare and show the difference between two mv fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377120#M170388</link>
      <description>&lt;P&gt;this works for me thanks!  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval diff = mvzip(req,res)
| makemv delim="," diff 
| stats count,list(req) as req,list(res) as res by diff
 | where count =1 
 | mvcombine diff delim="," 
 | nomv diff 
 | table req,res,diff
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jul 2019 20:00:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377120#M170388</guid>
      <dc:creator>taynord</dc:creator>
      <dc:date>2019-07-11T20:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare and show the difference between two mv fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377121#M170389</link>
      <description>&lt;P&gt;I am pretty sure that this only works for simple cases so be sure to evaluate deeply.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 20:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-and-show-the-difference-between-two-mv-fields/m-p/377121#M170389</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-07-11T20:12:25Z</dc:date>
    </item>
  </channel>
</rss>

