<?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: Sort column headers in timechart - customize in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sort-column-headers-in-timechart-customize/m-p/558144#M158524</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236039"&gt;@martin86&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggest to use table command to rearrange the columns.&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=10m count avg(duration) as avg  by timedelay 
| sort by _time timedelay desc
|table LIST OF COLUMNS YOU NEED&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KV&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jul 2021 10:53:52 GMT</pubDate>
    <dc:creator>kamlesh_vaghela</dc:creator>
    <dc:date>2021-07-02T10:53:52Z</dc:date>
    <item>
      <title>Sort column headers in timechart - customize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-column-headers-in-timechart-customize/m-p/558136#M158523</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to ask you, of there is some possibility order column based on requirement.&lt;/P&gt;&lt;P&gt;Case:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;search&amp;gt;
|eval lower_raw = lower(_raw) 
|rex field=lower_raw "^.*d=(?&amp;lt;opentask&amp;gt;[0-9]+).*" 
|rex field=lower_raw "^.*pm\s(?&amp;lt;trace&amp;gt;[0-9a-z-]+).*" 
|rex field=lower_raw "^.*taskid=(?&amp;lt;opentask&amp;gt;[0-9]+).*" 
|rex field=lower_raw "^.*uuid=(?&amp;lt;trace&amp;gt;[0-9a-z-]+).*" 
| eval task=opentask ."_".trace 
| transaction task
| eval timedelay=case(duration&amp;gt;=0 AND duration&amp;lt;2,"1 sec",duration&amp;gt;=2 AND duration&amp;lt;6,"2-5 sec",duration&amp;gt;=6 AND duration&amp;lt;11,"6-10 sec",duration&amp;gt;=11,"11 and more sec",1=1,"error") 
| timechart span=10m count avg(duration) as avg  by timedelay 
| sort by _time timedelay desc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have sorted by group (count event) and AVG duration&lt;/P&gt;&lt;P&gt;I mean, first column time (ok now)&lt;/P&gt;&lt;P&gt;second will be "count: 1sec"&lt;/P&gt;&lt;P&gt;third: "avg: 1sec"&lt;/P&gt;&lt;P&gt;forth: "count: 2-5sec"&lt;/P&gt;&lt;P&gt;fifth: "avg: 2-5sec"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;Current it looks like this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="martin86_0-1625218824624.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14918iC25EB25ADB80E9EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="martin86_0-1625218824624.png" alt="martin86_0-1625218824624.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;which is not nice&lt;/P&gt;&lt;P&gt;expectation:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="martin86_1-1625219055254.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14919i545EA8881EAF474D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="martin86_1-1625219055254.png" alt="martin86_1-1625219055254.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 09:45:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-column-headers-in-timechart-customize/m-p/558136#M158523</guid>
      <dc:creator>martin86</dc:creator>
      <dc:date>2021-07-02T09:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sort column headers in timechart - customize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-column-headers-in-timechart-customize/m-p/558144#M158524</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/236039"&gt;@martin86&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suggest to use table command to rearrange the columns.&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart span=10m count avg(duration) as avg  by timedelay 
| sort by _time timedelay desc
|table LIST OF COLUMNS YOU NEED&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KV&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 10:53:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-column-headers-in-timechart-customize/m-p/558144#M158524</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-07-02T10:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sort column headers in timechart - customize</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-column-headers-in-timechart-customize/m-p/558146#M158525</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you, it works&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="martin86_0-1625223659578.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14924i7BAF9E46E8A1A697/image-size/medium?v=v2&amp;amp;px=400" role="button" title="martin86_0-1625223659578.png" alt="martin86_0-1625223659578.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jul 2021 11:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-column-headers-in-timechart-customize/m-p/558146#M158525</guid>
      <dc:creator>martin86</dc:creator>
      <dc:date>2021-07-02T11:01:48Z</dc:date>
    </item>
  </channel>
</rss>

