<?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 can i use a eval expression with a result other then previously defined? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119218#M31965</link>
    <description>&lt;P&gt;We're getting there, just a little more. I don't see the value "OVERIG" but i know there are at least 3 results. Why isn't the string showing the 3rd row?&lt;/P&gt;

&lt;P&gt;column  row 1   row 2&lt;BR /&gt;
code    GPS     NIAS&lt;BR /&gt;
count   534     70 &lt;/P&gt;</description>
    <pubDate>Tue, 31 Mar 2015 07:58:54 GMT</pubDate>
    <dc:creator>robertspeckmann</dc:creator>
    <dc:date>2015-03-31T07:58:54Z</dc:date>
    <item>
      <title>How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119212#M31959</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Im currently building a dashboard and one of my search strings is the one below. I currently see the values GPS and NIAS but there is a third kind which is a irregular value. Is it possible to make the string ????? put the irregular value in a value displayed by "Other"&lt;/P&gt;

&lt;P&gt;index=Adapter (GPS OR NIAS)| rex field=_raw "ConversationID=(?.*)" | eval n=substr(bericht,1,3)  | chart count(eval(n="GPS")) AS "GPS", count(eval(n="NIA")) AS "NIAS" , ????????? AS "OVERIG" | transpose&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 06:09:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119212#M31959</guid>
      <dc:creator>robertspeckmann</dc:creator>
      <dc:date>2015-03-31T06:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119213#M31960</link>
      <description>&lt;P&gt;Hi Robert, I don't know the range of the n variable, but the next line&lt;BR /&gt;
index=Adapter (GPS OR NIAS)| rex field=_raw "ConversationID=(?.*)" | eval n=substr(bericht,1,3) | eval code=case(n=“GPS”,”GPS”,n=“NIA”,”NIAS”,0=0,”OVERIG”)|chart count by code | transpose&lt;BR /&gt;
will show 3 values in the graph, GPS, NIAS or OVERIG&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 07:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119213#M31960</guid>
      <dc:creator>baerts</dc:creator>
      <dc:date>2015-03-31T07:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119214#M31961</link>
      <description>&lt;P&gt;Thanks for the quick respons baerts but it won't compile yet&lt;/P&gt;

&lt;P&gt;index=Adapter (GPS OR NIAS)| rex field=_raw "ConversationID=(?.*)" | eval n=substr(bericht,1,3) | eval code=case(n=“GPS”,”GPS”,n=“NIA”,”NIAS”,0=0,”OVERIG”)|chart count by code | transpose&lt;/P&gt;

&lt;P&gt;Error in 'eval' command: The expression is malformed. An unexpected character is reached at '“GPS”,”GPS”,n=“NIA”,”NIAS”,0=0,”OVERIG”)'. &lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 07:39:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119214#M31961</guid>
      <dc:creator>robertspeckmann</dc:creator>
      <dc:date>2015-03-31T07:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119215#M31962</link>
      <description>&lt;P&gt;Robert hi, I also got an error when I copied the expression, after I typed it by hand, it worked. I also removed the " and " from OVERIG, NIAS and GPS&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 07:47:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119215#M31962</guid>
      <dc:creator>baerts</dc:creator>
      <dc:date>2015-03-31T07:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119216#M31963</link>
      <description>&lt;P&gt;OK so the string would be:&lt;/P&gt;

&lt;P&gt;index=tibco TerweeAdapter (GPS OR NIAS)| rex field=_raw "ConversationID=(?.*)" | eval n=substr(bericht,1,3) | eval code=case(n=GPS,GPS,n=NIA,NIAS,0=0,OVERIG)|chart count by code | transpose&lt;/P&gt;

&lt;P&gt;The result now is:&lt;/P&gt;

&lt;P&gt;column&lt;BR /&gt;
code&lt;BR /&gt;
count &lt;/P&gt;

&lt;P&gt;Before&lt;BR /&gt;
column  row 1&lt;BR /&gt;
GPS              72&lt;BR /&gt;
NIAS    12 &lt;/P&gt;

&lt;P&gt;SO i'm still not getting the proper response &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 07:51:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119216#M31963</guid>
      <dc:creator>robertspeckmann</dc:creator>
      <dc:date>2015-03-31T07:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119217#M31964</link>
      <description>&lt;P&gt;You need to put the quotes back &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I found out (actually i'm testing with index=_internal)&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 07:53:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119217#M31964</guid>
      <dc:creator>baerts</dc:creator>
      <dc:date>2015-03-31T07:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119218#M31965</link>
      <description>&lt;P&gt;We're getting there, just a little more. I don't see the value "OVERIG" but i know there are at least 3 results. Why isn't the string showing the 3rd row?&lt;/P&gt;

&lt;P&gt;column  row 1   row 2&lt;BR /&gt;
code    GPS     NIAS&lt;BR /&gt;
count   534     70 &lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 07:58:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119218#M31965</guid>
      <dc:creator>robertspeckmann</dc:creator>
      <dc:date>2015-03-31T07:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119219#M31966</link>
      <description>&lt;P&gt;what does ...eval code=.....|stats count by code show?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 09:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119219#M31966</guid>
      <dc:creator>baerts</dc:creator>
      <dc:date>2015-03-31T09:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119220#M31967</link>
      <description>&lt;P&gt;index=tibco TerweeAdapter (GPS OR NIAS)| rex field=_raw "ConversationID=(?.*)" | eval n=substr(bericht,1,3) | eval code=case(n="GPS","GPS",n="NIA","NIAS",0=0,"OVERIG") | chart count by code&lt;/P&gt;

&lt;P&gt;code    count&lt;BR /&gt;
GPS     76&lt;BR /&gt;
NIAS    12 &lt;/P&gt;

&lt;P&gt;index=tibco TerweeAdapter (GPS OR NIAS)| rex field=_raw "ConversationID=(?  .*)" | eval n=substr(bericht,1,3) | eval code=case(n="GPS","GPS",n="NIA","NIAS",0=0,"OVERIG") | stats count by code&lt;/P&gt;

&lt;P&gt;code    count&lt;BR /&gt;
GPS     76&lt;BR /&gt;
NIAS    12 &lt;/P&gt;

&lt;P&gt;Same result... still the last variable is missing for some reason&lt;/P&gt;

&lt;P&gt;ConversationID=(?  .*) is weird btw because its missing the word "bericht" between "&amp;lt;" and "&amp;gt;" which is in my string of course &lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 09:41:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119220#M31967</guid>
      <dc:creator>robertspeckmann</dc:creator>
      <dc:date>2015-03-31T09:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can i use a eval expression with a result other then previously defined?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119221#M31968</link>
      <description>&lt;P&gt;I have the solution! Because of the criteria in the front of the string (GPS OR NIAS) it could never find something else as OVERIG... With that one deleted and the 0=0 solution i finally got it:&lt;/P&gt;

&lt;P&gt;index=tibco TerweeAdapter | rex field=_raw "ConversationID=(?.*)" | eval n=substr(bericht,1,3) | eval code=case(n="GPS","GPS",n="NIA","NIAS",0=0,"OVERIG") | stats count by code&lt;/P&gt;

&lt;P&gt;code    count&lt;BR /&gt;
GPS     76&lt;BR /&gt;
NIAS    12&lt;BR /&gt;
OVERIG  9&lt;/P&gt;

&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 09:59:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-i-use-a-eval-expression-with-a-result-other-then/m-p/119221#M31968</guid>
      <dc:creator>robertspeckmann</dc:creator>
      <dc:date>2015-03-31T09:59:33Z</dc:date>
    </item>
  </channel>
</rss>

