<?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 List top 10 values for each fields of an index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/List-top-10-values-for-each-fields-of-an-index/m-p/656276#M226675</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm new to Splunk and despite searching extensively on this community site, I was not able to find a solution for what I thought was a rather simple problem. I would like to list, for each field in my index, the list of top 10 values.&lt;/P&gt;&lt;P&gt;I've tried different commande with stats values and top, and the following one gives me what's closest, but the output is messy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = my_index | multireport [top limit=10 field_1] [top limit=10 field_2] [top limit=10 field_3]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do get the top values of each field presented in different columns of the output, but also get many empty cells:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;field_1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;field_2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;field_3&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while i would like something like that:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;&lt;STRONG&gt;field_1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;&lt;STRONG&gt;field_2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;&lt;STRONG&gt;field_3&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="48px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="48px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="48px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has someone any idea how I could cleanup the output, and, ideally, easily loop through the column names so I don't have to write their name manually.&lt;/P&gt;&lt;P&gt;Thank!&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2023 14:45:38 GMT</pubDate>
    <dc:creator>fabienpe</dc:creator>
    <dc:date>2023-08-31T14:45:38Z</dc:date>
    <item>
      <title>List top 10 values for each fields of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-top-10-values-for-each-fields-of-an-index/m-p/656276#M226675</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm new to Splunk and despite searching extensively on this community site, I was not able to find a solution for what I thought was a rather simple problem. I would like to list, for each field in my index, the list of top 10 values.&lt;/P&gt;&lt;P&gt;I've tried different commande with stats values and top, and the following one gives me what's closest, but the output is messy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = my_index | multireport [top limit=10 field_1] [top limit=10 field_2] [top limit=10 field_3]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do get the top values of each field presented in different columns of the output, but also get many empty cells:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;field_1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;field_2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;field_3&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a top value of field_1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while i would like something like that:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;&lt;STRONG&gt;field_1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;&lt;STRONG&gt;field_2&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;&lt;STRONG&gt;field_3&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="47px"&gt;a top value of field_3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="48px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="48px"&gt;a top value of field_2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="48px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has someone any idea how I could cleanup the output, and, ideally, easily loop through the column names so I don't have to write their name manually.&lt;/P&gt;&lt;P&gt;Thank!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 14:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-top-10-values-for-each-fields-of-an-index/m-p/656276#M226675</guid>
      <dc:creator>fabienpe</dc:creator>
      <dc:date>2023-08-31T14:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: List top 10 values for each fields of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-top-10-values-for-each-fields-of-an-index/m-p/656281#M226679</link>
      <description>&lt;LI-CODE lang="markup"&gt;index = my_index | top limit=10 field_1
| appendcols
  [search index = my_index | top limit=10 field_2]
| appendcols
  [search index = my_index | top limit=10 field_3]
| table field_1 field_2 field_3&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 31 Aug 2023 14:53:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-top-10-values-for-each-fields-of-an-index/m-p/656281#M226679</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-08-31T14:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: List top 10 values for each fields of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-top-10-values-for-each-fields-of-an-index/m-p/656283#M226681</link>
      <description>&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 14:59:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-top-10-values-for-each-fields-of-an-index/m-p/656283#M226681</guid>
      <dc:creator>fabienpe</dc:creator>
      <dc:date>2023-08-31T14:59:53Z</dc:date>
    </item>
  </channel>
</rss>

