<?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 How to get top 10 values of a column and its raw data for each value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445177#M171573</link>
    <description>&lt;P&gt;index=omi_Uat host=DEFRNCMP* sourcetype=all_events_attributes | eval {idx} = elt | fields ID,UMN,TicketID,node | top limit=10 UMN&lt;/P&gt;

&lt;P&gt;This is the query I'm trying to get top 10 UMN . How can I get field values of ID,TicketID,node for each UMN&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 00:24:22 GMT</pubDate>
    <dc:creator>anz999</dc:creator>
    <dc:date>2020-09-30T00:24:22Z</dc:date>
    <item>
      <title>How to get top 10 values of a column and its raw data for each value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445177#M171573</link>
      <description>&lt;P&gt;index=omi_Uat host=DEFRNCMP* sourcetype=all_events_attributes | eval {idx} = elt | fields ID,UMN,TicketID,node | top limit=10 UMN&lt;/P&gt;

&lt;P&gt;This is the query I'm trying to get top 10 UMN . How can I get field values of ID,TicketID,node for each UMN&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:24:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445177#M171573</guid>
      <dc:creator>anz999</dc:creator>
      <dc:date>2020-09-30T00:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top 10 values of a column and its raw data for each value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445178#M171574</link>
      <description>&lt;P&gt;I think you can do a join and then search again.&lt;/P&gt;

&lt;P&gt;index=omi_Uat host=DEFRNCMP* sourcetype=all_events_attributes | eval {idx} = elt | fields ID,UMN,TicketID,node | top limit=10 UMN&lt;BR /&gt;
| join UMN&lt;BR /&gt;
   [search index=omi_Uat host=DEFRNCMP* sourcetype=all_events_attributes | eval {idx} = elt | fields ID,UMN,TicketID,node]&lt;BR /&gt;
| fields UMN ID TicketID node&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:24:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445178#M171574</guid>
      <dc:creator>jodyfsu</dc:creator>
      <dc:date>2020-09-30T00:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top 10 values of a column and its raw data for each value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445179#M171575</link>
      <description>&lt;P&gt;You can manually perform the top command after a stats that pulls the latest _raw event using the below query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=omi_Uat host=DEFRNCMP* sourcetype=all_events_attributes 
| eval {idx} = elt 
| fields ID,UMN,TicketID,node 
| stats count values(ID) as ID values(TicketID) as TicketID values(node) as node by UMN
| eventstats sum(count) as TotalCount
| eval percent=round((count/TotalCount)*100,6)
| sort 0 - count
| streamstats count as counter
| where counter&amp;lt;=10
| fields - TotalCount counter
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you require an other field that will make it a bit tricker, but it is possible:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=omi_Uat host=DEFRNCMP* sourcetype=all_events_attributes 
| eval {idx} = elt 
| fields ID,UMN,TicketID,node 
| stats count values(ID) as ID values(TicketID) as TicketID values(node) as node  by UMN
| eventstats sum(count) as TotalCount
| eval percent=round((count/TotalCount)*100,6)
| sort 0 - count
| streamstats count as counter
| eval UMN=if(counter&amp;gt;10, UMN, "Other")
| fields - TotalCount counter
| stats sum(count) as count sum(percent) as percent values(ID) as ID values(TicketID) as TicketID values(node) as node by UMN
| sort 0 - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 May 2019 13:24:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445179#M171575</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2019-05-02T13:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top 10 values of a column and its raw data for each value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445180#M171576</link>
      <description>&lt;P&gt;Sorry, I misread the initial request and the first result was providing _raw values but you wanted specific fields.  I have just adjusted it for that.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 13:30:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445180#M171576</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2019-05-02T13:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top 10 values of a column and its raw data for each value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445181#M171577</link>
      <description>&lt;P&gt;Thanks . It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 14:12:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445181#M171577</guid>
      <dc:creator>anz999</dc:creator>
      <dc:date>2019-05-02T14:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top 10 values of a column and its raw data for each value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445182#M171578</link>
      <description>&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 14:13:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445182#M171578</guid>
      <dc:creator>anz999</dc:creator>
      <dc:date>2019-05-02T14:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top 10 values of a column and its raw data for each value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445183#M171579</link>
      <description>&lt;P&gt;Glad I could help!&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 14:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-top-10-values-of-a-column-and-its-raw-data-for-each/m-p/445183#M171579</guid>
      <dc:creator>dmarling</dc:creator>
      <dc:date>2019-05-02T14:14:39Z</dc:date>
    </item>
  </channel>
</rss>

