<?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: the function sum(count) by xx field is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279502#M176329</link>
    <description>&lt;P&gt;stats sum(count) is not needed. just stats count is fine. &lt;BR /&gt;
&lt;PRE&gt;    |stats count by Asset_status&lt;/PRE&gt;&lt;/P&gt;

&lt;PRE&gt;eval Asset_status= if(Asset_Class=Server OR Asset_Type_Name=Server OR Asset_Class="" ,"Server",if( Asset_Class="eskto" OR Asset_Type_Name=Computer OR Asset_Type_Name="","Desktop","Others"))|stats count by Asset_status &lt;/PRE&gt;</description>
    <pubDate>Tue, 25 Oct 2016 12:21:07 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2016-10-25T12:21:07Z</dc:date>
    <item>
      <title>the function sum(count) by xx field is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279501#M176328</link>
      <description>&lt;P&gt;For me the below &lt;STRONG&gt;stats sum(count) by Asset_status&lt;/STRONG&gt; provies no results .&lt;/P&gt;

&lt;P&gt;eval Asset_status= if(Asset_Class=Server OR Asset_Type_Name=Server OR Asset_Class="" ,"Server",if( Asset_Class="&lt;EM&gt;eskto&lt;/EM&gt;" OR Asset_Type_Name=Computer OR Asset_Type_Name="","Desktop","Others"))|stats sum(count) by Asset_status&lt;/P&gt;

&lt;P&gt;Asset_status                    sum(count)&lt;BR /&gt;
Desktop&lt;BR /&gt;&lt;BR /&gt;
Others&lt;BR /&gt;&lt;BR /&gt;
Server  &lt;/P&gt;

&lt;P&gt;May i please know the reason for this and how can i get the sum of counts  values.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279501#M176328</guid>
      <dc:creator>umsundar2015</dc:creator>
      <dc:date>2020-09-29T11:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: the function sum(count) by xx field is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279502#M176329</link>
      <description>&lt;P&gt;stats sum(count) is not needed. just stats count is fine. &lt;BR /&gt;
&lt;PRE&gt;    |stats count by Asset_status&lt;/PRE&gt;&lt;/P&gt;

&lt;PRE&gt;eval Asset_status= if(Asset_Class=Server OR Asset_Type_Name=Server OR Asset_Class="" ,"Server",if( Asset_Class="eskto" OR Asset_Type_Name=Computer OR Asset_Type_Name="","Desktop","Others"))|stats count by Asset_status &lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Oct 2016 12:21:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279502#M176329</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-10-25T12:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: the function sum(count) by xx field is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279503#M176330</link>
      <description>&lt;P&gt;also, you can use case instead of a nested if&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...|eval Asset_status= case(Asset_Class=Server OR Asset_Type_Name=Server OR Asset_Class="" ,"Server", Asset_Class="eskto" OR Asset_Type_Name=Computer OR Asset_Type_Name="","Desktop",1=1,"Others")|stats count by Asset_status
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 Oct 2016 19:46:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279503#M176330</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2016-10-25T19:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: the function sum(count) by xx field is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279504#M176331</link>
      <description>&lt;P&gt;Hi Umsundar, may i know if this issue got resolved, can you please mark it as accepted answer..&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2016 11:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/the-function-sum-count-by-xx-field-is-not-working/m-p/279504#M176331</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-10-26T11:30:09Z</dc:date>
    </item>
  </channel>
</rss>

