<?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: stats values() doesn't return all values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147122#M41126</link>
    <description>&lt;P&gt;your Requette is correct also that the results obtained.&lt;BR /&gt;
you use the &lt;CODE&gt;where&lt;/CODE&gt; command to filter the results to the output of the &lt;CODE&gt;stats&lt;/CODE&gt; command.&lt;BR /&gt;
and also Reassure you that all vendors have a "src_act" because when you write "by src_act" in the command stats you also filter the results.&lt;/P&gt;

&lt;P&gt;try like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;src=* | eval src_act=src.".".act | stats values(vendor) as vendors dc(vendor) as num_vendors by src_act 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;src=* | eval src_act=src.".".act | stats values(vendor) as vendors |...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 28 Sep 2020 20:12:26 GMT</pubDate>
    <dc:creator>fdi01</dc:creator>
    <dc:date>2020-09-28T20:12:26Z</dc:date>
    <item>
      <title>stats values() doesn't return all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147121#M41125</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm new with splunk and I'm trying to get all the different values of a field with stats values() command with results grouped by another field. Here is the query:&lt;/P&gt;

&lt;P&gt;src=* | eval src_act=src.".".act | stats values(vendor) as vendors dc(vendor) as num_vendors by src_act | where num_vendors&amp;gt;1&lt;/P&gt;

&lt;P&gt;The maximum number of vendors returned by the query is two, but searching with the "view events" link of a result, the real number of different vendors is three or four in some cases.&lt;/P&gt;

&lt;P&gt;The same problem occurs using the list() function, it only shows the elements from a maximum of two different vendors.&lt;/P&gt;

&lt;P&gt;I tried to modify the list_maxsize param in limits.conf file but it doesn't solve the problem, even with the list() function, no more that 2 different values in "vendors" field.&lt;/P&gt;

&lt;P&gt;Anybody can help me?&lt;/P&gt;

&lt;P&gt;Thank you very much!&lt;/P&gt;

&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:12:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147121#M41125</guid>
      <dc:creator>jorgeoa</dc:creator>
      <dc:date>2020-09-28T20:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: stats values() doesn't return all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147122#M41126</link>
      <description>&lt;P&gt;your Requette is correct also that the results obtained.&lt;BR /&gt;
you use the &lt;CODE&gt;where&lt;/CODE&gt; command to filter the results to the output of the &lt;CODE&gt;stats&lt;/CODE&gt; command.&lt;BR /&gt;
and also Reassure you that all vendors have a "src_act" because when you write "by src_act" in the command stats you also filter the results.&lt;/P&gt;

&lt;P&gt;try like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;src=* | eval src_act=src.".".act | stats values(vendor) as vendors dc(vendor) as num_vendors by src_act 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;src=* | eval src_act=src.".".act | stats values(vendor) as vendors |...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:12:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147122#M41126</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2020-09-28T20:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: stats values() doesn't return all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147123#M41127</link>
      <description>&lt;P&gt;Thanks for the answer fdi01,&lt;/P&gt;

&lt;P&gt;The problem was that the field "act" have the same values in lower and upper case, and it seems that the "by src_act" doesn't interprets that cases in the same way as the search events does (search events ignore word case but "by" not).&lt;/P&gt;

&lt;P&gt;I solved the problem using lower() in the eval expression:&lt;/P&gt;

&lt;P&gt;eval src_act=lower(src.".".act)&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2015 09:06:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147123#M41127</guid>
      <dc:creator>jorgeoa</dc:creator>
      <dc:date>2015-06-10T09:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: stats values() doesn't return all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147124#M41128</link>
      <description>&lt;P&gt;You should have accepted fdi01's answer then, instead of posting your own and accepting it.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2015 16:46:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147124#M41128</guid>
      <dc:creator>jeremiahc4</dc:creator>
      <dc:date>2015-07-15T16:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: stats values() doesn't return all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147125#M41129</link>
      <description>&lt;P&gt;Hello jeremiahc4, I appreciate the fdi01's answer but it didn't help me in solving my problem. When I found the real problem and solution by modifying the query, I posted that solution. That's why I marked my explanation as accepted.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2015 16:57:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-values-doesn-t-return-all-values/m-p/147125#M41129</guid>
      <dc:creator>jorgeoa</dc:creator>
      <dc:date>2015-07-15T16:57:27Z</dc:date>
    </item>
  </channel>
</rss>

