<?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 multiple stats count function in the same search component in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/multiple-stats-count-function-in-the-same-search-component/m-p/473989#M133355</link>
    <description>&lt;P&gt;@gcusello &lt;BR /&gt;
I have multiple count functions in the same search component. What does it mean by that? What is really happening here?&lt;BR /&gt;
| stats count(vendor_action) as ActionEvents, count as TotalEvents&lt;/P&gt;

&lt;P&gt;I can definitely understand count(vendor_action) as ActionEvents. What is this part count as TotalEvents saying in regards to the first count?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2020 12:25:19 GMT</pubDate>
    <dc:creator>palisetty</dc:creator>
    <dc:date>2020-01-02T12:25:19Z</dc:date>
    <item>
      <title>multiple stats count function in the same search component</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-stats-count-function-in-the-same-search-component/m-p/473989#M133355</link>
      <description>&lt;P&gt;@gcusello &lt;BR /&gt;
I have multiple count functions in the same search component. What does it mean by that? What is really happening here?&lt;BR /&gt;
| stats count(vendor_action) as ActionEvents, count as TotalEvents&lt;/P&gt;

&lt;P&gt;I can definitely understand count(vendor_action) as ActionEvents. What is this part count as TotalEvents saying in regards to the first count?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 12:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-stats-count-function-in-the-same-search-component/m-p/473989#M133355</guid>
      <dc:creator>palisetty</dc:creator>
      <dc:date>2020-01-02T12:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: multiple stats count function in the same search component</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-stats-count-function-in-the-same-search-component/m-p/473990#M133356</link>
      <description>&lt;P&gt;The first count is counting up the events that have a vendor_action field. The second count is counting up the total number of events.&lt;/P&gt;

&lt;P&gt;You can use this to calculate a percentage, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count(vendor_action) as ActionEvents, count as TotalEvents
| eval message="Vendor action events account for ".round(ActionEvents/TotalEvents*100,1)."% of the total volume"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Jan 2020 13:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-stats-count-function-in-the-same-search-component/m-p/473990#M133356</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2020-01-02T13:37:31Z</dc:date>
    </item>
  </channel>
</rss>

