<?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: need difference from multivalue table column in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742347#M240824</link>
    <description>&lt;P&gt;This worked for me&amp;nbsp;&lt;BR /&gt;| makeresults&lt;BR /&gt;| eval APP1="appdelta", hostname1= mvappend("syzhost.domain1","abchost.domain1","egfhost.domain1"),hostname2=mvappend("syzhost.domain1","abchost.domain1")&lt;BR /&gt;| fields - _time&lt;BR /&gt;| eval match=max(mvmap(hostname1, if(isnotnull(mvfind(hostname2, hostname1)), 1, hostname1)))&lt;BR /&gt;| table APP1,hostname1,hostname2,match&lt;/P&gt;</description>
    <pubDate>Thu, 20 Mar 2025 16:56:07 GMT</pubDate>
    <dc:creator>secure</dc:creator>
    <dc:date>2025-03-20T16:56:07Z</dc:date>
    <item>
      <title>need difference from multivalue table column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742337#M240821</link>
      <description>&lt;P&gt;i have a list of hostnames being generated from left join for different application in multivalue table column&lt;/P&gt;&lt;TABLE width="418"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="74.9516px" height="24px"&gt;APP1&lt;/TD&gt;&lt;TD width="262.294px" height="24px"&gt;hostname1&lt;/TD&gt;&lt;TD width="133.6px" height="24px"&gt;hostnames2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="74.9516px" height="25px"&gt;appdelta&lt;/TD&gt;&lt;TD width="262.294px" height="49px"&gt;&lt;P&gt;syzhost.domain1&lt;/P&gt;&lt;P&gt;abchost.domain1&lt;/P&gt;&lt;P&gt;egfhost.domain1&lt;/P&gt;&lt;/TD&gt;&lt;TD width="133.6px" height="25px"&gt;&lt;P&gt;syzhost.domain1&lt;/P&gt;&lt;P&gt;abchost.domain1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="74.9516px" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="133.6px" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i need is a column with&amp;nbsp; just egfhostdomain1 in a separete column just showing the diff of the list&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 15:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742337#M240821</guid>
      <dc:creator>secure</dc:creator>
      <dc:date>2025-03-20T15:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: need difference from multivalue table column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742341#M240822</link>
      <description>&lt;LI-CODE lang="markup"&gt;| foreach hostname1 mode=multivalue
    [| eval diff=if(mvfind(hostnames2,&amp;lt;&amp;lt;ITEM&amp;gt;&amp;gt;)&amp;gt;=0,diff,mvappend(diff,&amp;lt;&amp;lt;ITEM&amp;gt;&amp;gt;))]&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 20 Mar 2025 15:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742341#M240822</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-03-20T15:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: need difference from multivalue table column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742343#M240823</link>
      <description>&lt;P&gt;&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 tried the query not getting the output&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval APP1="appdelta", hostname1= mvappend("syzhost.domain1","abchost.domain1","egfhost.domain1"),hostname2=mvappend("syzhost.domain1","abchost.domain1")&lt;BR /&gt;| fields - _time&lt;BR /&gt;| foreach hostname1 mode=multivalue&lt;BR /&gt;[| eval diff=if(mvfind(hostnames2,&amp;lt;&amp;lt;ITEM&amp;gt;&amp;gt;)&amp;gt;=0,diff,mvappend(diff,&amp;lt;&amp;lt;ITEM&amp;gt;&amp;gt;))]&lt;BR /&gt;| table APP1,hostname1,hostname2,diff&lt;/P&gt;&lt;P&gt;what i need in the diff column is&amp;nbsp;egfhost.domain1&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="secure_0-1742487519481.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38287iE35580AF8B322679/image-size/medium?v=v2&amp;amp;px=400" role="button" title="secure_0-1742487519481.png" alt="secure_0-1742487519481.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 16:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742343#M240823</guid>
      <dc:creator>secure</dc:creator>
      <dc:date>2025-03-20T16:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: need difference from multivalue table column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742347#M240824</link>
      <description>&lt;P&gt;This worked for me&amp;nbsp;&lt;BR /&gt;| makeresults&lt;BR /&gt;| eval APP1="appdelta", hostname1= mvappend("syzhost.domain1","abchost.domain1","egfhost.domain1"),hostname2=mvappend("syzhost.domain1","abchost.domain1")&lt;BR /&gt;| fields - _time&lt;BR /&gt;| eval match=max(mvmap(hostname1, if(isnotnull(mvfind(hostname2, hostname1)), 1, hostname1)))&lt;BR /&gt;| table APP1,hostname1,hostname2,match&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 16:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742347#M240824</guid>
      <dc:creator>secure</dc:creator>
      <dc:date>2025-03-20T16:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: need difference from multivalue table column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742350#M240825</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274955"&gt;@secure&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Might not be perfect, but does this work?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval APP1="appdelta", list1= mvappend("syzhost.domain1","abchost.domain1","egfhost.domain1"),list2=mvappend("syzhost.domain1","abchost.domain1") 
| fields - _time
|stats values(list2) as list2 by list1
| foreach list2 mode=multivalue [|eval notInList=IF(&amp;lt;&amp;lt;ITEM&amp;gt;&amp;gt;==list1,&amp;lt;&amp;lt;ITEM&amp;gt;&amp;gt;,null())]
| stats values(notInList)&lt;/LI-CODE&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Will&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 17:24:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742350#M240825</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-20T17:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: need difference from multivalue table column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742353#M240826</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170906"&gt;@livehybrid&lt;/a&gt;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;tried your solution its not working&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="secure_0-1742491600261.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38289iAED3BB766DAD6915/image-size/medium?v=v2&amp;amp;px=400" role="button" title="secure_0-1742491600261.png" alt="secure_0-1742491600261.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i was able to resolve this using&amp;nbsp;&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval APP1="appdelta", hostname1= mvappend("syzhost.domain1","abchost.domain1","egfhost.domain1"),hostname2=mvappend("syzhost.domain1","abchost.domain1")&lt;BR /&gt;| fields - _time&lt;BR /&gt;| eval match=max(mvmap(hostname1, if(isnotnull(mvfind(hostname2, hostname1)), 1, hostname1)))&lt;BR /&gt;| table APP1,hostname1,hostname2,match&lt;/P&gt;&lt;P&gt;but now i have a additional issue for some hostnames is "no hosts" in that case also its just giving me 1 hostname&amp;nbsp;&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval APP1="appdelta", hostname1= mvappend("syzhost.domain1","abchost.domain1","egfhost.domain1"),hostname2=("")&lt;BR /&gt;| fields - _time&lt;BR /&gt;| eval match=max(mvmap(hostname1, if(isnotnull(mvfind(hostname2, hostname1)), 1, hostname1)))&lt;BR /&gt;| table APP1,hostname1,hostname2,match&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="secure_1-1742491812770.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38290iE9FD6C9F2476E72D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="secure_1-1742491812770.png" alt="secure_1-1742491812770.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;which is not right&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 17:30:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742353#M240826</guid>
      <dc:creator>secure</dc:creator>
      <dc:date>2025-03-20T17:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: need difference from multivalue table column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742357#M240828</link>
      <description>&lt;P&gt;Your original post used hostname&lt;STRONG&gt;s&lt;/STRONG&gt;2 which I used in my suggestion. In your second post, you used hostname2 which is not the same field. Please retry with the correct field names.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 17:57:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742357#M240828</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-03-20T17:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: need difference from multivalue table column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742363#M240830</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274955"&gt;@secure&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I noticed another reply on your other question similar to this pointed towards using "&lt;A href="https://splunkbase.splunk.com/app/4297" target="_self"&gt;MVDiff Add-on For Splunk&lt;/A&gt;" which might help avoid some complex SPL searches.&lt;/P&gt;&lt;P&gt;Shamelessly pinching&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93915"&gt;@VatsalJagani&lt;/a&gt;&amp;nbsp;image from the &lt;A href="https://community.splunk.com/t5/Splunk-Search/compare-data-in-two-columns/m-p/712305/highlight/true#M240322" target="_self"&gt;last reply&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="livehybrid_1-1742497802505.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38293iE40A18F98587FCDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="livehybrid_1-1742497802505.png" alt="livehybrid_1-1742497802505.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Will&lt;/P&gt;</description>
      <pubDate>Thu, 20 Mar 2025 19:10:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-difference-from-multivalue-table-column/m-p/742363#M240830</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-20T19:10:11Z</dc:date>
    </item>
  </channel>
</rss>

