<?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: Join results from two lookups in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567233#M197657</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236314"&gt;@shaquibk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;with append command you should have the results you need:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup1
| append [ | inputlookup lookup1 | fields Name Current_Count ]
| stats values(Avg_Count) AS Avg_Count values(Current_Count) AS Current_Count BY Name&lt;/LI-CODE&gt;&lt;P&gt;If you have more numbers for Avg_Count or Current_Count, instead values use another option in the stats command (e.g. max or sum).&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Thu, 16 Sep 2021 09:01:19 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2021-09-16T09:01:19Z</dc:date>
    <item>
      <title>Join results from two lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567208#M197650</link>
      <description>&lt;P&gt;My requirement is something like this:&lt;/P&gt;&lt;P&gt;Lookup 1 looks like this&lt;/P&gt;&lt;P&gt;Name | Avg_Count&lt;BR /&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 3&lt;BR /&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; 7&lt;BR /&gt;D&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 8&lt;BR /&gt;F&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 5&lt;/P&gt;&lt;P&gt;Lookup 2 looks like this:&lt;/P&gt;&lt;P&gt;Name | Current_Count&lt;BR /&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 2&lt;BR /&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 4&lt;BR /&gt;D&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 6&lt;BR /&gt;&lt;BR /&gt;In the search, I input both these lookups and want results like this:&lt;BR /&gt;Name | Avg_Count | Current_count&lt;BR /&gt;A&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 2&lt;BR /&gt;B&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 7&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0/null (0 preferred)&lt;BR /&gt;D&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 8&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 6&lt;BR /&gt;F&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 0&lt;BR /&gt;C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 4&lt;/P&gt;&lt;P&gt;I have tried join/append/appendcols but all these have their limitations and won't give the intended results. Also looked at many solutions from community but couldn't find one.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Shaquib&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 06:54:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567208#M197650</guid>
      <dc:creator>shaquibk</dc:creator>
      <dc:date>2021-09-16T06:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Join results from two lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567232#M197656</link>
      <description>&lt;LI-CODE lang="markup"&gt;| inputlookup lookup1
| append [| inputlookup lookup2]
| stats values(*) as * by Name
| fillnull value=0&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Sep 2021 08:57:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567232#M197656</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-16T08:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Join results from two lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567233#M197657</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236314"&gt;@shaquibk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;with append command you should have the results you need:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup lookup1
| append [ | inputlookup lookup1 | fields Name Current_Count ]
| stats values(Avg_Count) AS Avg_Count values(Current_Count) AS Current_Count BY Name&lt;/LI-CODE&gt;&lt;P&gt;If you have more numbers for Avg_Count or Current_Count, instead values use another option in the stats command (e.g. max or sum).&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 09:01:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567233#M197657</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-09-16T09:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Join results from two lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567244#M197663</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both the solutions were accurate and worked perfectly. Appreciate the prompt response too.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Shaquib&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 10:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-results-from-two-lookups/m-p/567244#M197663</guid>
      <dc:creator>shaquibk</dc:creator>
      <dc:date>2021-09-16T10:23:31Z</dc:date>
    </item>
  </channel>
</rss>

