<?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 get this eval statement to isolate the search to just two values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606609#M210970</link>
    <description>&lt;LI-CODE lang="markup"&gt;| eval Home=if(Location="office1", "yes", "no") &lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 22 Jul 2022 07:40:52 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-07-22T07:40:52Z</dc:date>
    <item>
      <title>How to get this eval statement to isolate the search to just two values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606578#M210965</link>
      <description>&lt;P&gt;Working on a search where there's a field (Office Location) with about 5 different values that are stored in a lookup file. We're looking at attendance at a specific office (office 1) and differentiating who's actually going in. Specifically, we want to isolate people assigned to office 1 and those that are assigned to a different office. The original search looks like this but it would populate all the locations rather than just office 1 or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=index EVDESCR="event" READERDESC="reader"
| lookup users.csv ID as EMPLOYEE_ID 
|timechart span=1d dc(CARDNUM) by Location limit=0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using this eval statement to hopefully isolate the search to just two values. Yes, home office or no home office.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;|eval Home=if(Location"office1", yes, no) &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;The problem is this eval statement doesn't work and I'm not sure what I'm doing wrong. Any help is appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 00:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606578#M210965</guid>
      <dc:creator>msage</dc:creator>
      <dc:date>2022-07-22T00:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get this eval statement to isolate the search to just two values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606609#M210970</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval Home=if(Location="office1", "yes", "no") &lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 22 Jul 2022 07:40:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606609#M210970</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-22T07:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get this eval statement to isolate the search to just two values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606685#M210991</link>
      <description>&lt;P&gt;Tried that and it won't work for whatever reason. All the results are blank&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 18:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606685#M210991</guid>
      <dc:creator>msage</dc:creator>
      <dc:date>2022-07-22T18:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to get this eval statement to isolate the search to just two values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606689#M210992</link>
      <description>&lt;P&gt;Actually you were correct. Not having the quotation marks was what was giving me issues.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 19:08:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-this-eval-statement-to-isolate-the-search-to-just-two/m-p/606689#M210992</guid>
      <dc:creator>msage</dc:creator>
      <dc:date>2022-07-22T19:08:33Z</dc:date>
    </item>
  </channel>
</rss>

