<?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: compare data list in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311258#M164640</link>
    <description>&lt;P&gt;Great solution and I also really like the first part of the query to build a set of data.  Both of these should be on some list of solution patterns.&lt;/P&gt;</description>
    <pubDate>Sat, 02 Dec 2017 19:52:59 GMT</pubDate>
    <dc:creator>MonkeyK</dc:creator>
    <dc:date>2017-12-02T19:52:59Z</dc:date>
    <item>
      <title>compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311252#M164634</link>
      <description>&lt;P&gt;Assume i have two stores which must have the same items but one is missing.&lt;/P&gt;

&lt;P&gt;My search returns for example&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;STORE=LONDON ITEM=ORANGE
STORE=LONDON ITEM=APPLE
STORE=PARIS ITEM=ORANGE
STORE=PARIS ITEM=APPLE
STORE=PARIS ITEM=LEMON
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can i display the missing item LEMON visible in store london?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 19:00:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311252#M164634</guid>
      <dc:creator>mkrauss1</dc:creator>
      <dc:date>2017-12-02T19:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311253#M164635</link>
      <description>&lt;P&gt;@mkrauss1, will you always have two stores or can it be more than two as well?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 19:21:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311253#M164635</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-02T19:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311254#M164636</link>
      <description>&lt;P&gt;can have many stores&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 19:22:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311254#M164636</guid>
      <dc:creator>mkrauss1</dc:creator>
      <dc:date>2017-12-02T19:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311255#M164637</link>
      <description>&lt;P&gt;Do you have lookup file for STORES or can you have a lookup file?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 19:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311255#M164637</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-02T19:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311256#M164638</link>
      <description>&lt;P&gt;But a search for two stores would be great as well&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 19:28:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311256#M164638</guid>
      <dc:creator>mkrauss1</dc:creator>
      <dc:date>2017-12-02T19:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311257#M164639</link>
      <description>&lt;P&gt;@mkrauss1, please find the following run anywhere search. It mimic three ITEMs and three STORES. You can expand to as many as you want. Obviously the query will be less expensive if there were lookups for unique STORES and ITEMS.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults
|  eval data= "STORE=LONDON ITEM=BANANA;STORE=DELHI ITEM=ORANGE;STORE=LONDON ITEM=APPLE;STORE=PARIS ITEM=ORANGE;STORE=PARIS ITEM=APPLE;STORE=PARIS ITEM=LEMON"
|  makemv data delim=";"
|  mvexpand data
|  rename data as _raw
|  KV
|  table ITEM STORE
|  eventstats values(STORE) as AllStores
|  stats count as Match dc(AllStores) as MaxMatch values(STORE) as StoreFound values(AllStores) as AllStores by ITEM
|  search Match&amp;lt;MaxMatch
|  mvexpand AllStores
|  where !(AllStores in (StoreFound))
|  rename AllStores as StoreMissing
|  stats values(StoreFound) as StoreFound  values(StoreMissing) as StoreMissing by ITEM
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: Commands till &lt;CODE&gt;|  table ITEM STORE&lt;/CODE&gt; create sample data for demo.&lt;BR /&gt;
Also &lt;CODE&gt;in&lt;/CODE&gt; command will work on &lt;CODE&gt;Splunk Enterprise 6.6&lt;/CODE&gt; onward.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 19:41:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311257#M164639</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-02T19:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311258#M164640</link>
      <description>&lt;P&gt;Great solution and I also really like the first part of the query to build a set of data.  Both of these should be on some list of solution patterns.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 19:52:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311258#M164640</guid>
      <dc:creator>MonkeyK</dc:creator>
      <dc:date>2017-12-02T19:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311259#M164641</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="STORE=LONDON ITEM=ORANGE:STORE=LONDON ITEM=APPLE:STORE=PARIS ITEM=ORANGE:STORE=PARIS ITEM=APPLE:STORE=PARIS ITEM=LEMON" 
| makemv delim=":" raw 
| mvexpand raw 
| rename raw AS _raw 
| kv
| stats dc(STORE) AS num_stores values(STORE) AS stores BY ITEM
| search num_stores=1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Dec 2017 20:14:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311259#M164641</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-12-02T20:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: compare data list</title>
      <link>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311260#M164642</link>
      <description>&lt;P&gt;Thanks @MonkeyK &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I learnt &lt;CODE&gt;KV and extract&lt;/CODE&gt; for mocking up data from @cmerriman &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Most of community members devise these tricks to mock sample data as per question to assist users. Obviously we do not have access to user's data another reason is re-usability by other members and also testing.&lt;/P&gt;

&lt;P&gt;You are right that such data generation queries can go to Tips &amp;amp; Tricks section of Splunk Blogs but not sure who can do that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 20:16:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/compare-data-list/m-p/311260#M164642</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-02T20:16:43Z</dc:date>
    </item>
  </channel>
</rss>

