<?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: Display the top 5 line chart field values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Display-the-top-5-line-chart-field-values/m-p/478519#M134201</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;|addtotals col=f row=t | sort - Total| head 5|fields - Total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 09 Sep 2019 18:21:27 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2019-09-09T18:21:27Z</dc:date>
    <item>
      <title>Display the top 5 line chart field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-the-top-5-line-chart-field-values/m-p/478518#M134200</link>
      <description>&lt;P&gt;I'm having some trouble with getting the top 5 line values on a line chart. My current search is below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=db  sourcetype="dbmetrics" db_type IN (DB2, SQLSERVER) 
|eval db_inst=db_instance +" - "   +application
|eval db_app=database +" - " +application
|eval db_info=coalesce(db_app, db_inst)
|timechart span=1h eval(round(avg(db_connections),0)) as DB values(DB) by db_info useother=false limit=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The problem is that when I add  &lt;CODE&gt;where MAX in top5&lt;/CODE&gt; I get the warning splunk Series filtering is disabled if a split-by field average. &lt;BR /&gt;
Is there another way to get this to work? &lt;BR /&gt;
Currently it looks like this but I want it to just show the top 5 lines.&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/275606-screen-shot-2019-09-09-at-125250-pm.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;Note: I have to take the average of db_connections due to certain db_instances having multiple events per hour&lt;/P&gt;

&lt;P&gt;Thanks for any help.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:09:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-the-top-5-line-chart-field-values/m-p/478518#M134200</guid>
      <dc:creator>mcg_connor</dc:creator>
      <dc:date>2020-09-30T02:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Display the top 5 line chart field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-the-top-5-line-chart-field-values/m-p/478519#M134201</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|addtotals col=f row=t | sort - Total| head 5|fields - Total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Sep 2019 18:21:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-the-top-5-line-chart-field-values/m-p/478519#M134201</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-09-09T18:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Display the top 5 line chart field values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Display-the-top-5-line-chart-field-values/m-p/478520#M134202</link>
      <description>&lt;P&gt;Why can't you just use this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...  |timechart span=1h eval(round(avg(db_connections),0)) as DB values(DB) by db_info useother=false limit=5
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Sep 2019 21:47:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Display-the-top-5-line-chart-field-values/m-p/478520#M134202</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-09-09T21:47:59Z</dc:date>
    </item>
  </channel>
</rss>

