<?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: implement excel countif function in Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/implement-excel-countif-function-in-Splunk/m-p/341949#M101333</link>
    <description>&lt;P&gt;Try:&lt;BR /&gt;
&lt;CODE&gt;| stats count as Count_Root_values by ROOT_value&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If you want to keep the original data as well, you could try &lt;CODE&gt;eventstats&lt;/CODE&gt; instead of &lt;CODE&gt;stats&lt;/CODE&gt;. But that will not give you the exact result from your example, as it will put the count on each row. Why exactly is that a problem?&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 08:18:22 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-04-19T08:18:22Z</dc:date>
    <item>
      <title>implement excel countif function in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/implement-excel-countif-function-in-Splunk/m-p/341948#M101332</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;Following is my source table (pelase consider the first 2 fields:- Value and Root_Value only):- &lt;IMG src="https://community.splunk.com/storage/temp/240624-sorceimage.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I want to find the count of values based on root values and store it a new field Count_Root_Values.The output should look like this &lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/240625-needeoutput.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;In excel, there is formulla for it :- =IF(COUNTIF(B$2:B2; B2)=1;COUNTIF(B:B; B2);TEXT(;)) .&lt;BR /&gt;
In Splunk, I am trying to use the eval to generate the new field and stats count(Value) by ROOT_Value to find the number. But I really missing the iterative process to fin the count only once. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:04:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/implement-excel-countif-function-in-Splunk/m-p/341948#M101332</guid>
      <dc:creator>Chandras11</dc:creator>
      <dc:date>2020-09-29T19:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: implement excel countif function in Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/implement-excel-countif-function-in-Splunk/m-p/341949#M101333</link>
      <description>&lt;P&gt;Try:&lt;BR /&gt;
&lt;CODE&gt;| stats count as Count_Root_values by ROOT_value&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If you want to keep the original data as well, you could try &lt;CODE&gt;eventstats&lt;/CODE&gt; instead of &lt;CODE&gt;stats&lt;/CODE&gt;. But that will not give you the exact result from your example, as it will put the count on each row. Why exactly is that a problem?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 08:18:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/implement-excel-countif-function-in-Splunk/m-p/341949#M101333</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-04-19T08:18:22Z</dc:date>
    </item>
  </channel>
</rss>

