<?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: Lookup from multiple table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528429#M149215</link>
    <description>&lt;P&gt;your query&lt;/P&gt;&lt;P&gt;| stats count by&amp;nbsp;&lt;SPAN&gt;DepartmentName, ProductName&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Nov 2020 09:11:13 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-11-08T09:11:13Z</dc:date>
    <item>
      <title>Lookup from multiple table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528424#M149210</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;my goal is to find and combine data from multiple source.&lt;/P&gt;&lt;P&gt;Here:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;employee_lookup: the table for all employee database&lt;/LI&gt;&lt;LI&gt;product_lookup: the table for all the product&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;now my goal is to find, how many company wide product each department uses and group by DepartmentName, ProductName, and Count.&lt;/P&gt;&lt;P&gt;The department name is on the&amp;nbsp; "employee_lookup" table along with employee name, department name. So when any employee clicks on a product, it is counted as a product use and logs the data into Splunk.&lt;/P&gt;&lt;P&gt;my Splunk query is as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data = "global"&lt;BR /&gt;|&amp;nbsp; lookup&amp;nbsp; product_lookup productID OUTPUT ProductName&lt;BR /&gt;|&amp;nbsp; lookup employee_lookup userID OUTPUT DepartmentName&lt;BR /&gt;|&amp;nbsp; table ProductName, DepartmentName, UserID&lt;/P&gt;&lt;P&gt;that query does not work...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to find the total count of product usages by Department.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The resulting table should be like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DepartmentName,&amp;nbsp; &amp;nbsp; &amp;nbsp;Product,&amp;nbsp; &amp;nbsp; &amp;nbsp;count&lt;BR /&gt;--------------------------------------------------&lt;BR /&gt;Dept_5,&amp;nbsp; &amp;nbsp; &amp;nbsp;Product1234,&amp;nbsp; &amp;nbsp; &amp;nbsp;2000&lt;BR /&gt;Dept_5,&amp;nbsp; &amp;nbsp; &amp;nbsp;Product333,&amp;nbsp; &amp;nbsp; &amp;nbsp;1434&lt;BR /&gt;Dept_5,&amp;nbsp; &amp;nbsp; &amp;nbsp;Product633,&amp;nbsp; &amp;nbsp; &amp;nbsp;600&lt;BR /&gt;Dept_2,&amp;nbsp; &amp;nbsp;Product333,&amp;nbsp; &amp;nbsp; &amp;nbsp;2500&lt;BR /&gt;Dept_2,&amp;nbsp; &amp;nbsp;Product215,&amp;nbsp; &amp;nbsp; &amp;nbsp;2500&lt;BR /&gt;Dept_2,&amp;nbsp; &amp;nbsp;Product415,&amp;nbsp; &amp;nbsp; &amp;nbsp;1200&lt;BR /&gt;....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;so basically group by department, product, count&amp;nbsp;&lt;/P&gt;&lt;P&gt;any suggestions and recommendation would be very helpful. Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 07:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528424#M149210</guid>
      <dc:creator>basics</dc:creator>
      <dc:date>2020-11-08T07:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup from multiple table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528425#M149211</link>
      <description>&lt;P&gt;If your log has both&amp;nbsp;&lt;SPAN&gt;productID and userID field, your query will run.&lt;BR /&gt;If there aren't these, you should provide more details.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 08:31:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528425#M149211</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-11-08T08:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup from multiple table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528427#M149213</link>
      <description>&lt;P&gt;I had a typo and it works now.&lt;/P&gt;&lt;P&gt;However, couple more questions because I cannot do:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Group by DepartmentName, ProductName, Count&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;how do I do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 08:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528427#M149213</guid>
      <dc:creator>basics</dc:creator>
      <dc:date>2020-11-08T08:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup from multiple table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528429#M149215</link>
      <description>&lt;P&gt;your query&lt;/P&gt;&lt;P&gt;| stats count by&amp;nbsp;&lt;SPAN&gt;DepartmentName, ProductName&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 09:11:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-from-multiple-table/m-p/528429#M149215</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-11-08T09:11:13Z</dc:date>
    </item>
  </channel>
</rss>

