<?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: Using AND in case() function in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101852#M182908</link>
    <description>&lt;P&gt;Woops I didn't see that! Hahaha thanks again!&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jul 2012 00:02:57 GMT</pubDate>
    <dc:creator>Paxxxman</dc:creator>
    <dc:date>2012-07-19T00:02:57Z</dc:date>
    <item>
      <title>Using AND in case() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101848#M182904</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I'm currently trying to get the case() function working so that for each .csv file I have (which has information saved in the exact same format as the other, even though the information is pertaining to different things entirely) I can turn the information back into meaningful data.&lt;/P&gt;

&lt;P&gt;Example - .csv files are named SHB_00X_[DATE].csv where X ranges from 1-8. Each of those .csv files bring in a value LANE, ranging from 1-3 or 1-4. However, the actual lanes in our system range from 1-19. So when I do a standard "stats count by LANE", I only get counts on lanes 1-4, but I need a count for 1-19.&lt;/P&gt;

&lt;P&gt;So I tried to change the LANE name with the following case function:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval RoadLane=case(source="C:\Project\TIRTL\Destination\SHB_001_*" AND LANE=="1", "17", source="C:\Project\TIRTL\Destination\SHB_001_*" AND LANE=="2", "18", source="C:\Project\TIRTL\Destination\SHB_001_*" AND LANE=="3", "19")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and the case() function goes on and on to sort out each lane by source AND lane. The search does not work at all. Any ideas why that is?&lt;/P&gt;

&lt;P&gt;All help is appreciated! Thanks! &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101848#M182904</guid>
      <dc:creator>Paxxxman</dc:creator>
      <dc:date>2020-09-28T12:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using AND in case() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101849#M182905</link>
      <description>&lt;P&gt;I would try the like() eval function instead:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| eval RoadLane=case(like(source,"C:\Project\TIRTL\Destination\SHB_001_%") AND LANE=="1","17", like(source,"C:\Project\TIRTL\Destination\SHB_001_%") AND LANE=="2","18",like(source,"C:\Project\TIRTL\Destination\SHB_001_%") AND LANE=="3","19")&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2012 03:41:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101849#M182905</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2012-07-18T03:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using AND in case() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101850#M182906</link>
      <description>&lt;P&gt;That did it! Thank you so much.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2012 22:42:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101850#M182906</guid>
      <dc:creator>Paxxxman</dc:creator>
      <dc:date>2012-07-18T22:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using AND in case() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101851#M182907</link>
      <description>&lt;P&gt;Glad to hear that! Please feel free to accept my answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2012 22:47:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101851#M182907</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2012-07-18T22:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using AND in case() function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101852#M182908</link>
      <description>&lt;P&gt;Woops I didn't see that! Hahaha thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2012 00:02:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-AND-in-case-function/m-p/101852#M182908</guid>
      <dc:creator>Paxxxman</dc:creator>
      <dc:date>2012-07-19T00:02:57Z</dc:date>
    </item>
  </channel>
</rss>

