<?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 extract one filed from two lookups with same fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-filed-from-two-lookups-with-same-fields/m-p/549203#M155812</link>
    <description>&lt;P&gt;Try using the first lookup as an index into the second.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup Lookup1.csv 
| lookup Lookup2.csv lookup_Z_field OUTPUT Demand_X
| ...&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 23 Apr 2021 23:35:33 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-04-23T23:35:33Z</dc:date>
    <item>
      <title>How to extract one filed from two lookups with same fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-filed-from-two-lookups-with-same-fields/m-p/549173#M155797</link>
      <description>&lt;P&gt;Hey There,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have two lookups, both have same exact fields. I need all the fields from Lookup1.csv, which I have no problem getting and only one filed from Lookup2.csv. The only field I need from Lookup2.csv is Lookup_Demand_X, which I created an eval for - gave it the name Demand_X, since lookups use same field names I wanted to differentiate.&lt;BR /&gt;&lt;BR /&gt;The issue I have is that I only need one column from Lookup2.csv - (Demand_X) and the rest of the data only pertaining to Lookup1.csv.&amp;nbsp; When I bring in the column for Demand_X from Lookup1.csv I consequently bring the all the data for Lookup1. csv.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I only keep the data from Lookup1.csv and only bring in just one field from Lookup2.csv (Demand_X)?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup Lookup1.csv | inputlookup append=t Lookup2.csv | eval Demand_X=case(lookup_Demand_Team="Red", lookup_Demand_X), Demand_Y=case(lookup_Demand_Team="Blue",lookup_Demand_Y) | stats values(Demand_X) as Demand_X, values(Demand_Y) as Demand_Y values(lookup_Demand_Team) as lookup_Demand_Team, values(lookup_Grouping) as lookup_Grouping, values(lookup_desc) as lookup_desc, values(lookup_Sub) as lookup_Sub values(lookup_Service) as lookup_Service values(lookup_Type) as lookup_Type count(lookup_Count) as lookup_Count by lookup_Z_Field  | where isNotNull(Demand_Y)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 18:08:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-filed-from-two-lookups-with-same-fields/m-p/549173#M155797</guid>
      <dc:creator>MeMilo09</dc:creator>
      <dc:date>2021-04-23T18:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract one filed from two lookups with same fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-filed-from-two-lookups-with-same-fields/m-p/549203#M155812</link>
      <description>&lt;P&gt;Try using the first lookup as an index into the second.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup Lookup1.csv 
| lookup Lookup2.csv lookup_Z_field OUTPUT Demand_X
| ...&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Apr 2021 23:35:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-one-filed-from-two-lookups-with-same-fields/m-p/549203#M155812</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-04-23T23:35:33Z</dc:date>
    </item>
  </channel>
</rss>

