<?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: eval statement not giving expected result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566345#M197376</link>
    <description>&lt;P&gt;You don't need the table command at the end for the visualization; remove it and it should work.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 17:30:59 GMT</pubDate>
    <dc:creator>s2_splunk</dc:creator>
    <dc:date>2021-09-08T17:30:59Z</dc:date>
    <item>
      <title>eval statement not giving expected result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566340#M197372</link>
      <description>&lt;P&gt;index = pcf_logs cf_org_name = creorg OR cf_org_name = SvcITDnFAppsOrg cf_app_name=VerifyReviewConsumerService host="*" | eval message = case(like(msg,"%Auto Approved%"), "Auto Approved", like(msg,"%Auto Rejected%"), "Auto Rejected",1=1,msg)|stats sum(Count) as Count by message | table message Count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having msg in event which contains Auto Approve or&amp;nbsp; Auto Rejected in between a big sentence&lt;/P&gt;&lt;P&gt;I want to count auto approve and auto rejected events but it doesn't give the expected result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 17:05:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566340#M197372</guid>
      <dc:creator>hrishi_deshpand</dc:creator>
      <dc:date>2021-09-08T17:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: eval statement not giving expected result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566341#M197373</link>
      <description>&lt;P&gt;Can you provide an anonymized sample event?&lt;/P&gt;&lt;P&gt;Also, what IS the unexpected result you are getting?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 17:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566341#M197373</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2021-09-08T17:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: eval statement not giving expected result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566344#M197375</link>
      <description>&lt;P&gt;index = pcf_logs cf_org_name = creorg OR cf_org_name = SvcITDnFAppsOrg cf_app_name=VerifyReviewConsumerService host="*" | eval msg = case(like(msg,"%Auto Approved%"), "Auto Approved", like(msg,"%Auto Rejected%"), "Auto Rejected")|stats count by msg | table count, msg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;able to get the grouping but visualization for pie chart says need numeric data&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 17:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566344#M197375</guid>
      <dc:creator>hrishi_deshpand</dc:creator>
      <dc:date>2021-09-08T17:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: eval statement not giving expected result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566345#M197376</link>
      <description>&lt;P&gt;You don't need the table command at the end for the visualization; remove it and it should work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 17:30:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566345#M197376</guid>
      <dc:creator>s2_splunk</dc:creator>
      <dc:date>2021-09-08T17:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: eval statement not giving expected result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566347#M197377</link>
      <description>&lt;P&gt;index = pcf_logs cf_org_name = creorg OR cf_org_name = SvcITDnFAppsOrg cf_app_name=VerifyReviewConsumerService host="*" | eval msg = case(like(msg,"%Auto Approved%"), "Auto Approved", like(msg,"%Auto Rejected%"), "Auto Rejected", like(msg,"%manual review%"),"Manual Review")|stats count by msg | table msg, count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this worked perfectly just incase any one interested thanks&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 17:36:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-statement-not-giving-expected-result/m-p/566347#M197377</guid>
      <dc:creator>hrishi_deshpand</dc:creator>
      <dc:date>2021-09-08T17:36:12Z</dc:date>
    </item>
  </channel>
</rss>

