<?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: count value not returning in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581706#M202647</link>
    <description>&lt;P&gt;I think I see the problem.&amp;nbsp; Splunk looks at "*bookappointment*" as a literal string whereas you're probably expecting the asterisks to be treated as wildcards.&amp;nbsp; To find a string within a string, use either the &lt;FONT face="courier new,courier"&gt;like&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;match&lt;/FONT&gt; function.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats ..., sum(eval(like(msg, "%bookappointment%"))) as response&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats ..., sum(eval(match(msg, "bookappointment"))) as response&lt;/LI-CODE&gt;&lt;P&gt;Notice I changed the &lt;FONT face="courier new,courier"&gt;count&lt;/FONT&gt; function to &lt;FONT face="courier new,courier"&gt;sum&lt;/FONT&gt;.&amp;nbsp; That's because &lt;FONT face="courier new,courier"&gt;count&lt;/FONT&gt; will include all of the 1's and 0's returned by &lt;FONT face="courier new,courier"&gt;eval&lt;/FONT&gt;, giving the same result regardless of the value of msg.&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;sum&lt;/FONT&gt; function, however, effectively counts only 1's.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Jan 2022 16:57:50 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-01-19T16:57:50Z</dc:date>
    <item>
      <title>count value not returning</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581650#M202622</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm Trying to calculate success percentage, for that I'm taking total and request count. but, I'm unable to get count for the request.&lt;/P&gt;&lt;P&gt;Please see the attachments to get more insights.&lt;/P&gt;&lt;P&gt;Image1 :- Gives total count of book appointment&amp;nbsp; request count.&lt;/P&gt;&lt;P&gt;Image2 :-&amp;nbsp; Unable to get Request count from the total book appointments.&lt;/P&gt;&lt;P&gt;Image3 :-&amp;nbsp; Example of&amp;nbsp; &amp;nbsp;Successfully getting results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me to resolve this.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 14:29:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581650#M202622</guid>
      <dc:creator>kiran007</dc:creator>
      <dc:date>2022-01-19T14:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: count value not returning</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581652#M202623</link>
      <description>&lt;P&gt;Two thoughts.&lt;/P&gt;&lt;P&gt;1) Try 'data.msg' similar to what is done in Image 3.&lt;/P&gt;&lt;P&gt;2) Try renaming data.msg.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;... | rename "data.msg" as msg
| stats ... eval(msg="...") as response&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Jan 2022 14:35:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581652#M202623</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-19T14:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: count value not returning</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581656#M202626</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp; for quick response. I tried both but no luck.&lt;BR /&gt;&lt;BR /&gt;Please see attachment.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 14:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581656#M202626</guid>
      <dc:creator>kiran007</dc:creator>
      <dc:date>2022-01-19T14:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: count value not returning</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581660#M202627</link>
      <description>&lt;P&gt;Getting Individual Book Appointment Response count, but not getting bookappointmentresponse count from *bookappointment*&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 14:53:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581660#M202627</guid>
      <dc:creator>kiran007</dc:creator>
      <dc:date>2022-01-19T14:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: count value not returning</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581706#M202647</link>
      <description>&lt;P&gt;I think I see the problem.&amp;nbsp; Splunk looks at "*bookappointment*" as a literal string whereas you're probably expecting the asterisks to be treated as wildcards.&amp;nbsp; To find a string within a string, use either the &lt;FONT face="courier new,courier"&gt;like&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;match&lt;/FONT&gt; function.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats ..., sum(eval(like(msg, "%bookappointment%"))) as response&lt;/LI-CODE&gt;&lt;P&gt;or&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats ..., sum(eval(match(msg, "bookappointment"))) as response&lt;/LI-CODE&gt;&lt;P&gt;Notice I changed the &lt;FONT face="courier new,courier"&gt;count&lt;/FONT&gt; function to &lt;FONT face="courier new,courier"&gt;sum&lt;/FONT&gt;.&amp;nbsp; That's because &lt;FONT face="courier new,courier"&gt;count&lt;/FONT&gt; will include all of the 1's and 0's returned by &lt;FONT face="courier new,courier"&gt;eval&lt;/FONT&gt;, giving the same result regardless of the value of msg.&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;sum&lt;/FONT&gt; function, however, effectively counts only 1's.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 16:57:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581706#M202647</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-01-19T16:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: count value not returning</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581709#M202648</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp; it worked....&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 17:36:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-value-not-returning/m-p/581709#M202648</guid>
      <dc:creator>kiran007</dc:creator>
      <dc:date>2022-01-19T17:36:16Z</dc:date>
    </item>
  </channel>
</rss>

