<?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 I create a field that contains the differences between 2 other multi value (MV) fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416963#M119983</link>
    <description>&lt;P&gt;I think what he is asking is ...&lt;/P&gt;

&lt;P&gt;if MVField1 has values :    [ A , B , C ]&lt;BR /&gt;
and&lt;BR /&gt;
if MVField2 has values:     [ B , C , D ]&lt;/P&gt;

&lt;P&gt;you want a return of a new mvfield with values [A , D] , the two values that don't exist in both...  &lt;/P&gt;

&lt;P&gt;correct?&lt;/P&gt;</description>
    <pubDate>Thu, 04 Oct 2018 20:00:01 GMT</pubDate>
    <dc:creator>darrenfuller</dc:creator>
    <dc:date>2018-10-04T20:00:01Z</dc:date>
    <item>
      <title>How do I create a field that contains the differences between 2 other multi value (MV) fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416961#M119981</link>
      <description>&lt;P&gt;I have a search that returns two multi value fields. I am looking to create a third field which would contain the differences between the two MV fields. I was hoping to use something like diff() but that only works for comparing events. Ideally the format would be similar to diff() but would compare fields in one event instead of across different events. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    index=sacl_audit NOT (Object_Name="E:\\System Volume Information\\*") 
    | lookup ConvertSDDL sddl_format AS Original_Security_Descriptor OUTPUT human_format AS original 
    | lookup ConvertSDDL sddl_format AS New_Security_Descriptor OUTPUT human_format AS new 
    | makemv original delim="|" 
    | makemv new delim="|" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Oct 2018 15:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416961#M119981</guid>
      <dc:creator>bkwoka</dc:creator>
      <dc:date>2018-10-04T15:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a field that contains the differences between 2 other multi value (MV) fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416962#M119982</link>
      <description>&lt;P&gt;@bkwoka &lt;/P&gt;

&lt;P&gt;If you want column wise deference use &lt;CODE&gt;|eval=a-b&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Or row wise.&lt;BR /&gt;
Use &lt;CODE&gt;|delta&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 19:00:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416962#M119982</guid>
      <dc:creator>harishalipaka</dc:creator>
      <dc:date>2018-10-04T19:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a field that contains the differences between 2 other multi value (MV) fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416963#M119983</link>
      <description>&lt;P&gt;I think what he is asking is ...&lt;/P&gt;

&lt;P&gt;if MVField1 has values :    [ A , B , C ]&lt;BR /&gt;
and&lt;BR /&gt;
if MVField2 has values:     [ B , C , D ]&lt;/P&gt;

&lt;P&gt;you want a return of a new mvfield with values [A , D] , the two values that don't exist in both...  &lt;/P&gt;

&lt;P&gt;correct?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 20:00:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416963#M119983</guid>
      <dc:creator>darrenfuller</dc:creator>
      <dc:date>2018-10-04T20:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a field that contains the differences between 2 other multi value (MV) fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416964#M119984</link>
      <description>&lt;P&gt;Close. Ideally if MVFieldOld has [A, B, C] and MVFieldNew has [C, D, E] I would like MVDiff to have something like [-A, -B, +D, +E]. Similar to the diff() command. &lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 23:44:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416964#M119984</guid>
      <dc:creator>bkwoka</dc:creator>
      <dc:date>2018-10-04T23:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a field that contains the differences between 2 other multi value (MV) fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416965#M119985</link>
      <description>&lt;P&gt;@bkwoka&lt;/P&gt;

&lt;P&gt;Can you please try below search?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sacl_audit NOT (Object_Name="E:\\System Volume Information\\*") 
| lookup ConvertSDDL sddl_format AS Original_Security_Descriptor OUTPUT human_format AS original 
| lookup ConvertSDDL sddl_format AS New_Security_Descriptor OUTPUT human_format AS new 
| makemv original delim="|" 
| makemv new delim="|" 
| table original new
| eval row=1 
| eval originalX=original 
| accum row 
| fillnull original new value=" " 
| mvexpand originalX 
| eval original_A = mvfind(new,originalX) 
| where isnull(original_A) 
| eval originalX="+".originalX 
| stats values(*) as * by row 
| eval newY=new 
| mvexpand newY 
| eval new_A = mvfind(original,newY) 
| where isnull(new_A) 
| eval newY="-".newY 
| fillnull originalX newY value=" " 
| stats values(*) as * by row | eval diff=mvappend(originalX,newY) | table original new diff
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My Sample Search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval original="A,B,C,D", new="B,C,D,E", original=split(original,","),new=split(new,",") 
| table original new 
| append 
    [| makeresults 
    | eval original="W,X,Y,Z", new="Y,Z,A,B", original=split(original,","),new=split(new,",") 
    | table original new 
        ] 
| eval row=1 
| eval originalX=original 
| accum row 
| fillnull original new value=" " 
| mvexpand originalX 
| eval original_A = mvfind(new,originalX) 
| where isnull(original_A) 
| eval originalX="+".originalX 
| stats values(*) as * by row 
| eval newY=new 
| mvexpand newY 
| eval new_A = mvfind(original,newY) 
| where isnull(new_A) 
| eval newY="-".newY 
| fillnull originalX newY value=" " 
| stats values(*) as * by row | eval diff=mvappend(originalX,newY) | table original new diff
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 11:31:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416965#M119985</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-05T11:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a field that contains the differences between 2 other multi value (MV) fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416966#M119986</link>
      <description>&lt;P&gt;This gave me a lot of insight and direction as to what I need to do. I am now running into an issue where mvfind() isn't returning an index even when the fields match. For example here is the command I am running: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sacl_audit NOT (Object_Name="E:\\System Volume Information\\*") 
| lookup ConvertSDDL sddl_format AS Original_Security_Descriptor OUTPUT human_format AS original 
| lookup ConvertSDDL sddl_format AS New_Security_Descriptor OUTPUT human_format AS new 
| makemv original delim="|" 
| makemv new delim="|" 
| eval row=1 
| accum row 
| eval originalTemp = original
| eval newTemp = new
| mvexpand originalTemp
| eval originalS = mvfind(new,originalTemp)
| table row,original,new,originalTemp,originalS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am not sure if I can attach pictures but in the following screenshot you can see how the first row isn't working but the second row is. &lt;IMG src="https://i.imgur.com/H8eNCuM.png" alt="mvfind() problem" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 15:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416966#M119986</guid>
      <dc:creator>bkwoka</dc:creator>
      <dc:date>2018-10-05T15:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a field that contains the differences between 2 other multi value (MV) fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416967#M119987</link>
      <description>&lt;P&gt;@bkwoka&lt;/P&gt;

&lt;P&gt;Can you please share sample values from &lt;CODE&gt;original&lt;/CODE&gt; field? S&lt;BR /&gt;
o I can work on it...&lt;/P&gt;</description>
      <pubDate>Fri, 05 Oct 2018 17:19:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416967#M119987</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-10-05T17:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I create a field that contains the differences between 2 other multi value (MV) fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416968#M119988</link>
      <description>&lt;P&gt;Here are the first 3 rows&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;IdentityReference : BUILTIN\Administrators FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow
IdentityReference : CREATOR OWNER FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow
IdentityReference : NT AUTHORITY\SYSTEM FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow 

IdentityReference : BUILTIN\Administrators FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow
IdentityReference : CREATOR OWNER FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow
IdentityReference : NT AUTHORITY\SYSTEM FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow 

IdentityReference : BUILTIN\Administrators FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow
IdentityReference : CREATOR OWNER FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow
IdentityReference : NT AUTHORITY\SYSTEM FileSystemRights : FullControl IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropogationFlags : AccessControlType : Allow 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Oct 2018 13:42:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-create-a-field-that-contains-the-differences-between-2/m-p/416968#M119988</guid>
      <dc:creator>bkwoka</dc:creator>
      <dc:date>2018-10-08T13:42:05Z</dc:date>
    </item>
  </channel>
</rss>

