<?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: Top of field with multiple values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Top-of-field-with-multiple-values/m-p/426213#M172630</link>
    <description>&lt;P&gt;Hi @nickhillscpl and @harishalipaka, &lt;/P&gt;

&lt;P&gt;Thanks for your help, but the solution was the below:&lt;/P&gt;

&lt;P&gt;Instead of execute:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;mysearch | top rules&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The execution must be:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;mysearch | top rules{}&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;Looks seem that &lt;CODE&gt;{}&lt;/CODE&gt; is used for fields with several values.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Mar 2019 07:20:33 GMT</pubDate>
    <dc:creator>adri9valle</dc:creator>
    <dc:date>2019-03-11T07:20:33Z</dc:date>
    <item>
      <title>Top of field with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-of-field-with-multiple-values/m-p/426211#M172628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to do a simple search that returns the top repeated values of a field.&lt;/P&gt;

&lt;P&gt;The problem is that this field has multiple values, then when a try to exec the search, it returns 0 results.&lt;/P&gt;

&lt;P&gt;With another field with a single value, this problem doesn't happen.&lt;/P&gt;

&lt;P&gt;For example, let's suppose that we have this two fields; level and groups the field level contents a unique value for example 7, but the groups field can content multiples values [foo,bar,cir...]&lt;/P&gt;

&lt;P&gt;If execute ** &lt;EM&gt;query *| top level limit 5 *&lt;/EM&gt; will return the top 5 levels but if execute ** &lt;EM&gt;query&lt;/EM&gt; | top groups limit 5 ** does not return anything.&lt;/P&gt;

&lt;P&gt;How can get the top of a field with multiple values?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 08:10:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-of-field-with-multiple-values/m-p/426211#M172628</guid>
      <dc:creator>adri9valle</dc:creator>
      <dc:date>2019-03-08T08:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Top of field with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-of-field-with-multiple-values/m-p/426212#M172629</link>
      <description>&lt;P&gt;I think you mean that the 'group' field can contain comma separated lists of values?&lt;/P&gt;

&lt;P&gt;If I have understood that bit correctly, try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your search]|makemv delim="," groups|top groups limit 5 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Mar 2019 12:15:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-of-field-with-multiple-values/m-p/426212#M172629</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-08T12:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Top of field with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-of-field-with-multiple-values/m-p/426213#M172630</link>
      <description>&lt;P&gt;Hi @nickhillscpl and @harishalipaka, &lt;/P&gt;

&lt;P&gt;Thanks for your help, but the solution was the below:&lt;/P&gt;

&lt;P&gt;Instead of execute:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;mysearch | top rules&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The execution must be:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;mysearch | top rules{}&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;Looks seem that &lt;CODE&gt;{}&lt;/CODE&gt; is used for fields with several values.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 07:20:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-of-field-with-multiple-values/m-p/426213#M172630</guid>
      <dc:creator>adri9valle</dc:creator>
      <dc:date>2019-03-11T07:20:33Z</dc:date>
    </item>
  </channel>
</rss>

