<?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 Issue with stats count with multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406394#M190920</link>
    <description>&lt;P&gt;I am using the stats count function to get a count of unique events. as part of the list I am want to show additional fields in the Statistics output. When I run my fairly simple query and use |stats count by field1 the numbers look correct. When I use | stats count by field1,field2,field3,field4  The count seems to increase more for each field I add but the strange thing is that the number of Statistics in the results does not change. For my  real query I get 990 events and 142 entries on the Statistics tab for every search no matter how many fields I use in the stats count but the count for each statistic in the list grows every time I add a field.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2019 12:55:13 GMT</pubDate>
    <dc:creator>a238574</dc:creator>
    <dc:date>2019-07-25T12:55:13Z</dc:date>
    <item>
      <title>Issue with stats count with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406394#M190920</link>
      <description>&lt;P&gt;I am using the stats count function to get a count of unique events. as part of the list I am want to show additional fields in the Statistics output. When I run my fairly simple query and use |stats count by field1 the numbers look correct. When I use | stats count by field1,field2,field3,field4  The count seems to increase more for each field I add but the strange thing is that the number of Statistics in the results does not change. For my  real query I get 990 events and 142 entries on the Statistics tab for every search no matter how many fields I use in the stats count but the count for each statistic in the list grows every time I add a field.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2019 12:55:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406394#M190920</guid>
      <dc:creator>a238574</dc:creator>
      <dc:date>2019-07-25T12:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with stats count with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406395#M190921</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats count,  list(field2)  as field2,list(field3) as field3,list(field4) as field4 by field1 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Jul 2019 15:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406395#M190921</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-25T15:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with stats count with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406396#M190922</link>
      <description>&lt;P&gt;Did some more testing trying to figure out why the count was increasing and my results got worse. I made a simple search looking to produce a set of results where the field I count by should equal the number of events...&lt;/P&gt;

&lt;P&gt;index=x accountid=123456789 | stats count by accountid&lt;/P&gt;

&lt;P&gt;The search returns 936 events but the count is 1248.... how does it get to 1248 from 936 events&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 12:37:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406396#M190922</guid>
      <dc:creator>a238574</dc:creator>
      <dc:date>2019-07-26T12:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with stats count with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406397#M190923</link>
      <description>&lt;P&gt;That produces a multi line output for each unique event&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 15:37:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-stats-count-with-multiple-fields/m-p/406397#M190923</guid>
      <dc:creator>a238574</dc:creator>
      <dc:date>2019-07-26T15:37:38Z</dc:date>
    </item>
  </channel>
</rss>

