<?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 make a new list of values that are in one list but not another/ in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536389#M151660</link>
    <description>&lt;P&gt;I need to see the logs to make that query.&lt;BR /&gt;If you're asking if it's possible, yes, it is.&lt;BR /&gt;1 If it's a day-by-day query, you can create a separate field for the day and use that to aggregate.&lt;BR /&gt;2 To aggregate "no", create a separate lookup and compare.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 21:16:39 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2021-01-19T21:16:39Z</dc:date>
    <item>
      <title>How to make a new list of values that are in one list but not another/</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536119#M151580</link>
      <description>&lt;P&gt;I have created two lists from stats-list and stats-values. These are called Lookup_Vals(from lookup table's Lookup_procedures field) and Originals(from splunk search Procedure_Name field). I want a new list that is made up of values in the Lookup_Vals list but NOT in the Originals list. I've tried using match command but that just tells me if the lists are the same or not. I've also tried using "List(eval(if(IN(Lookup_procedures,Originals),"Match","No Match"))) as Missing" but that doesn't seem to work either. The if statement resolves to false every time even though I know the lists are&amp;nbsp;&lt;EM&gt;mostly&lt;/EM&gt; the same.&amp;nbsp; Full search:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|search index here
| fields Procedure_Name,Process_Name,Activity_Code, UpdatedDate
| eval Procedure_Name=coalesce(Process_Name, Procedure_Name)
| stats count by Procedure_Name
| append [|inputlookup chubDashboardProcedures.csv |rename 1.0_Procedures as Lookup_procedures| eval count=0|fields Lookup_procedures count] 
| stats sum(count) as total, List(Lookup_procedures) as Lookup_Vals, Values(Procedure_Name) as Originals, Values(eval(if(IN(Lookup_procedures,Originals),"Match","No Match"))) as Missing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also true using mvjoin(Originals, ",") command on the Originals but that doesn't seem to help either.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jan 2021 17:19:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536119#M151580</guid>
      <dc:creator>schilds427</dc:creator>
      <dc:date>2021-01-16T17:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a new list of values that are in one list but not another/</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536158#M151591</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230460"&gt;@schilds427&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Originals will not exist during the stats statement&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|search index here
| fields Procedure_Name,Process_Name,Activity_Code, UpdatedDate
| eval Procedure_Name=coalesce(Process_Name, Procedure_Name)
| stats count by Procedure_Name
| append [|inputlookup chubDashboardProcedures.csv |rename 1.0_Procedures as Lookup_procedures| eval count=0|fields Lookup_procedures count] 
| stats sum(count) as total, values(Lookup_procedures) as Lookup_Vals by Procedure_Name
| eval Missing=if(isnull(mvfind(Lookup_Vals,Procedure_Name)), 1,0)
| stats values(Procedure_Name) as Procedure_Name by Missing&lt;/LI-CODE&gt;&lt;P&gt;Your final stats statement does not have any split by clause, so at best you would get a single row with a set of lookup values, a set of original values and one or two words indicating match or no match with no tie up between the matching and non matching lines.&lt;/P&gt;&lt;P&gt;In the above, the stats command will 'join' the lookup data and the indexed data and add the lookup to each procedure_name row, then the missing evaluation can be done after that using mvfind().&lt;/P&gt;&lt;P&gt;Then you can do whatever aggregation you need, i.e. above it will create up to two rows of Procedure_Name values for each missing set.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jan 2021 22:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536158#M151591</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2021-01-17T22:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a new list of values that are in one list but not another/</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536169#M151595</link>
      <description>&lt;P&gt;&amp;gt;&lt;SPAN&gt;I want a new list that is made up of values in the Lookup_Vals list but NOT in the Originals list&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Why don't we just coalesce the fields we want to match and summarize them in stats?&lt;/P&gt;&lt;P&gt;However, it seems like you're taking some kind of quiz when you only present the query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jan 2021 08:17:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536169#M151595</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-01-18T08:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a new list of values that are in one list but not another/</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536333#M151642</link>
      <description>&lt;P&gt;Thank you, this was very helpful. I also wanted to further group my procedures by the day they happened but it seems like you can't do that and include procedures that didn't happen at all since those procedures obviously won't have date information.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 13:56:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536333#M151642</guid>
      <dc:creator>schilds427</dc:creator>
      <dc:date>2021-01-19T13:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a new list of values that are in one list but not another/</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536389#M151660</link>
      <description>&lt;P&gt;I need to see the logs to make that query.&lt;BR /&gt;If you're asking if it's possible, yes, it is.&lt;BR /&gt;1 If it's a day-by-day query, you can create a separate field for the day and use that to aggregate.&lt;BR /&gt;2 To aggregate "no", create a separate lookup and compare.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 21:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536389#M151660</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-01-19T21:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a new list of values that are in one list but not another/</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536515#M151696</link>
      <description>&lt;P&gt;So my events have fields that look like this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021-01-05 05:00:00.666, Auto_Status_ID="502", Process_Name="usp_Balance_PPS", Procedure_Name="Balance PPS", Process_Start_Time="2021-01-03 19:44:54.007", Process_End_Time="2021-01-03 20:14:07.723", Activity_Code="2000", Result_Description="Process Complete", CreatedDate="2019-05-17 16:16:12.3", UpdatedDate="2021-01-03 20:14:07.723"&lt;/LI-CODE&gt;&lt;P&gt;I can do as you suggest and make a new "Day" field using the UpdatedDate field as a base, and that works for grouping events that&amp;nbsp;&lt;EM&gt;did&lt;/EM&gt; happen,&amp;nbsp; but how would I then list procedures that didn't happen within those groups since those don't have UpdatedDate or any other field?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 14:58:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536515#M151696</guid>
      <dc:creator>schilds427</dc:creator>
      <dc:date>2021-01-20T14:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a new list of values that are in one list but not another/</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536637#M151741</link>
      <description>&lt;P&gt;sample:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal component!=Metrics
| stats min(_time) as start max(_time) as end by component
| convert ctime(start) ctime(end)
| eval fm="search"
| append [| makeresults
| eval component=split("Metrics#LMSlaveInfo","#")
| mvexpand component
| fields - _time
| eval fm="lookup"]
| eventstats values(fm) as fm dc(fm) as count by component&lt;/LI-CODE&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/Inputlookup" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/Inputlookup&lt;/A&gt;&lt;/P&gt;&lt;P&gt;try append=T&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 08:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-make-a-new-list-of-values-that-are-in-one-list-but-not/m-p/536637#M151741</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2021-01-21T08:41:34Z</dc:date>
    </item>
  </channel>
</rss>

