<?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: Sorting Charts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sorting-Charts/m-p/45612#M10847</link>
    <description>&lt;P&gt;Very nice.. I think I will use the addtotals option.  Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 27 Nov 2012 16:31:05 GMT</pubDate>
    <dc:creator>richnavis</dc:creator>
    <dc:date>2012-11-27T16:31:05Z</dc:date>
    <item>
      <title>Sorting Charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sorting-Charts/m-p/45610#M10845</link>
      <description>&lt;P&gt;I have the following search that returns a chart of response times for web pages by GET and POST.  &lt;/P&gt;

&lt;P&gt;index=iis_PRODUCT | regex cs_method="(GET|POST)"  | chart avg(time_taken) as response_time count(host) as hits by cs_uri_stem, cs_method  | sort response_time&lt;/P&gt;

&lt;P&gt;However, the sort command does not seem to work.   Perhaps it's because the field names have the method appended to it?  something like this....  hits:GET   hits:POST.     Not sure how to solve this.   &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:52:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sorting-Charts/m-p/45610#M10845</guid>
      <dc:creator>richnavis</dc:creator>
      <dc:date>2020-09-28T12:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sorting-Charts/m-p/45611#M10846</link>
      <description>&lt;P&gt;You are indeed trying to sort by a column that does not exist at this time. I see two options:&lt;/P&gt;

&lt;P&gt;First, you could pick one of the columns to sort by. Let's assume one of the response_time fields is called "response_time: GET":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search... | chart... | sort "response_time: GET"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively, if you cannot decide which response time field is the relevant one to search, you could summarize them into a helper field that then is used for sorting:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search... | chart... | addtotals fieldname=temp_sort response_time* | sort temp_sort
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:52:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sorting-Charts/m-p/45611#M10846</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2020-09-28T12:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Charts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sorting-Charts/m-p/45612#M10847</link>
      <description>&lt;P&gt;Very nice.. I think I will use the addtotals option.  Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2012 16:31:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sorting-Charts/m-p/45612#M10847</guid>
      <dc:creator>richnavis</dc:creator>
      <dc:date>2012-11-27T16:31:05Z</dc:date>
    </item>
  </channel>
</rss>

