<?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 Need to add the input lookup file in the search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554442#M157378</link>
    <description>&lt;P&gt;Hello All&lt;/P&gt;&lt;P&gt;"Good Day"&lt;/P&gt;&lt;P&gt;index="aedc"&lt;BR /&gt;| rex field=source "-_(?&amp;lt;source&amp;gt;\S+)"&lt;BR /&gt;| rex "(?&amp;lt;ModuleID&amp;gt;MY\d+)"&lt;BR /&gt;| rex "(?&amp;lt;Path&amp;gt;/F.\s\S+\s\S+\s\S+\s\S+\s\S{5})"&lt;BR /&gt;|search"source"="*" MY22 "CRS_ASIL"="*" *&lt;BR /&gt;|rename "TC_D2_Test Result" as Result, TC_D2_Execution_date as verified_Date,"CRS__TestType" as TestType&lt;BR /&gt;| rename CRS__implementation_phase as CRS_IP, "TC_Test Result" as result&lt;BR /&gt;| eval verified_Date=if((verified_Date == "Attr not found : D2_Execution_date"),null(),verified_Date)&lt;BR /&gt;|eval Date=strptime(verified_Date, "%a %d %B %Y %H:%M:%S")|eval date=if(Date&amp;gt;1604600000.000000 OR Date&amp;gt;1602000000.000000,Date,0)&lt;BR /&gt;| eval First_Date=verified_Date, sortstring="~"&lt;BR /&gt;|eval date=if(Date&amp;gt;1604600000.000000 OR Date&amp;gt;1602000000.000000 ,Date,0)&lt;BR /&gt;| append&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#003300"&gt;[|inputlookup DoorsMappingwithDatenopartial.csv |append[| inputlookup DoorsMappingNoDate.csv&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#003300"&gt;|where bPartialResultsEnabled="FALSE"]]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;| stats count(eval(Path="/F. System Testing/System Functional Test Cases")) as "Functional Total",count(eval(Result=case(Path="/F. System Testing/System Functional Test Cases" AND&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;date=Date&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;,Result))) as "Functional Test Conducted",count(eval(Result=case(Path="/F. System Testing/System Functional Test Cases" AND Result="Pass" OR Result="PASS" AND date=Date,Result))) as "Functional Pass",count(eval(Result=case(Path="/F. System Testing/System Functional Test Cases"AND Result="Fail" OR Result="FAIL" AND date=Date,Result))) as "Functional Fail" by "CRS_Customer Requirement Identifier"&lt;BR /&gt;|eventstats sum("Functional Total") as Functional_Total,sum("Functional Test Conducted") as "Functional Test Conducted",sum("Functional Pass") as "Functional Pass",sum("Functional Fail") as "Functional Fail"|table Functional_Total,"Functional Test Conducted","Functional Pass","Functional Fail"&lt;BR /&gt;&lt;BR /&gt;Above is my query in the query i am trying to add condition using lookup files&amp;nbsp;&lt;BR /&gt;Condition is if&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#003300"&gt;bPartialResultsEnabled is False&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;we should consider&lt;/FONT&gt;&lt;FONT color="#003300"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;date&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in functional count if it is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;we should not consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;date&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;I tried all possible ways ,I know&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;Please help me out..&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;Thank you in advance&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jun 2021 08:53:31 GMT</pubDate>
    <dc:creator>renuka</dc:creator>
    <dc:date>2021-06-04T08:53:31Z</dc:date>
    <item>
      <title>Need to add the input lookup file in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554442#M157378</link>
      <description>&lt;P&gt;Hello All&lt;/P&gt;&lt;P&gt;"Good Day"&lt;/P&gt;&lt;P&gt;index="aedc"&lt;BR /&gt;| rex field=source "-_(?&amp;lt;source&amp;gt;\S+)"&lt;BR /&gt;| rex "(?&amp;lt;ModuleID&amp;gt;MY\d+)"&lt;BR /&gt;| rex "(?&amp;lt;Path&amp;gt;/F.\s\S+\s\S+\s\S+\s\S+\s\S{5})"&lt;BR /&gt;|search"source"="*" MY22 "CRS_ASIL"="*" *&lt;BR /&gt;|rename "TC_D2_Test Result" as Result, TC_D2_Execution_date as verified_Date,"CRS__TestType" as TestType&lt;BR /&gt;| rename CRS__implementation_phase as CRS_IP, "TC_Test Result" as result&lt;BR /&gt;| eval verified_Date=if((verified_Date == "Attr not found : D2_Execution_date"),null(),verified_Date)&lt;BR /&gt;|eval Date=strptime(verified_Date, "%a %d %B %Y %H:%M:%S")|eval date=if(Date&amp;gt;1604600000.000000 OR Date&amp;gt;1602000000.000000,Date,0)&lt;BR /&gt;| eval First_Date=verified_Date, sortstring="~"&lt;BR /&gt;|eval date=if(Date&amp;gt;1604600000.000000 OR Date&amp;gt;1602000000.000000 ,Date,0)&lt;BR /&gt;| append&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#003300"&gt;[|inputlookup DoorsMappingwithDatenopartial.csv |append[| inputlookup DoorsMappingNoDate.csv&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#003300"&gt;|where bPartialResultsEnabled="FALSE"]]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;| stats count(eval(Path="/F. System Testing/System Functional Test Cases")) as "Functional Total",count(eval(Result=case(Path="/F. System Testing/System Functional Test Cases" AND&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;date=Date&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;,Result))) as "Functional Test Conducted",count(eval(Result=case(Path="/F. System Testing/System Functional Test Cases" AND Result="Pass" OR Result="PASS" AND date=Date,Result))) as "Functional Pass",count(eval(Result=case(Path="/F. System Testing/System Functional Test Cases"AND Result="Fail" OR Result="FAIL" AND date=Date,Result))) as "Functional Fail" by "CRS_Customer Requirement Identifier"&lt;BR /&gt;|eventstats sum("Functional Total") as Functional_Total,sum("Functional Test Conducted") as "Functional Test Conducted",sum("Functional Pass") as "Functional Pass",sum("Functional Fail") as "Functional Fail"|table Functional_Total,"Functional Test Conducted","Functional Pass","Functional Fail"&lt;BR /&gt;&lt;BR /&gt;Above is my query in the query i am trying to add condition using lookup files&amp;nbsp;&lt;BR /&gt;Condition is if&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#003300"&gt;bPartialResultsEnabled is False&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;we should consider&lt;/FONT&gt;&lt;FONT color="#003300"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;date&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in functional count if it is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;we should not consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;date&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;I tried all possible ways ,I know&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;Please help me out..&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#003300"&gt;Thank you in advance&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 08:53:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554442#M157378</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2021-06-04T08:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need to add the input lookup file in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554453#M157384</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224369"&gt;@renuka&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here you have to use some trick. Please check below search. &amp;nbsp;&lt;/P&gt;&lt;P&gt;In this search I have created a field name 'flag' with required conditions and same flag will be used in stats.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_FIRST_SEARCH
| eval flag = case(bPartialResultsEnabled=="False" AND date=Date,"True", bPartialResultsEnabled=="True","True",1=1,"False")
| stats count(eval(Result=case(Path="/F. System Testing/System Functional Test Cases" AND flag="True" ,Result))) as "Functional Test Conducted"
YOUR_REST_SEARCH&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 09:41:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554453#M157384</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-04T09:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need to add the input lookup file in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554462#M157387</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you reply&lt;BR /&gt;&amp;nbsp;But I couldn't extract inputlookup data into prevvious search query can you please ellaborate in detail&lt;BR /&gt;that would help me&lt;BR /&gt;&lt;BR /&gt;Thank you in advance&lt;BR /&gt;"Happy Splunking"&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 10:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554462#M157387</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2021-06-04T10:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need to add the input lookup file in the search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554466#M157388</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224369"&gt;@renuka&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try this search.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YOUR_SEARCH
| eval flag = case(bPartialResultsEnabled=="False" AND date=Date,"True", bPartialResultsEnabled=="True","True",1=1,"False")
| stats count(eval(Path=="/F. System Testing/System Functional Test Cases" AND flag="True")) as "Functional Test Conducted"
REST_OF_THE_SEARCH&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Explanation:&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval flag = case(bPartialResultsEnabled=="False" AND date=Date,"True", bPartialResultsEnabled=="True","True",1=1,"False")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This flag variable will identify whether particular event should be consider or not for count in stats command.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Condition is if&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;FONT color="#003300"&gt;bPartialResultsEnabled is False&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#003300"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;we should consider&lt;/FONT&gt;&lt;FONT color="#003300"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;date&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in functional count if it is&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;we should not consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;date&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;As per our logic, &lt;STRONG&gt;date=Date&lt;/STRONG&gt; should only consider when &lt;STRONG&gt;bPartialResultsEnabled="False"&lt;/STRONG&gt; else &lt;STRONG&gt;bPartialResultsEnabled=True &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;So event should be consider when one of this 2 condition matched.&lt;/P&gt;&lt;P&gt;&amp;nbsp;And in our case&amp;nbsp;flag is doing same.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count(eval(Path=="/F. System Testing/System Functional Test Cases" AND flag="True")) as "Functional Test Conducted"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed in &lt;STRONG&gt;eval&lt;/STRONG&gt;&amp;nbsp;so you can try that also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 11:34:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-to-add-the-input-lookup-file-in-the-search/m-p/554466#M157388</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-04T11:34:07Z</dc:date>
    </item>
  </channel>
</rss>

