<?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: How to sort dynamic column names? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179379#M51631</link>
    <description>&lt;P&gt;Thanks for your response but it didn't help.&lt;BR /&gt;
I am actually want to get my columns in the chart sorted.&lt;BR /&gt;
I.E. the most highest column will be the most left column and the most lowest columns will be the most right column.&lt;/P&gt;

&lt;P&gt;I am unable to do this because I used xyseries that replaced my axis and now each Value is a column and I cannot sort by this Value. Sort is working on column and now I need to sort by row.&lt;BR /&gt;
Is this possible?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Nov 2014 20:46:04 GMT</pubDate>
    <dc:creator>avitallange</dc:creator>
    <dc:date>2014-11-04T20:46:04Z</dc:date>
    <item>
      <title>How to sort dynamic column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179377#M51629</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have 2 columns: Name and Value.&lt;BR /&gt;
My column names are dynamically changed. &lt;BR /&gt;
How can I sort the column Names? &lt;BR /&gt;
Please note I cannot use fields command to set the order since I don't know the column names in advance.&lt;/P&gt;

&lt;P&gt;This is an example for my search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | chart  avg(Value) AS Value by Name | sort  -Value | head 10 | eval N=Name | eval Name ="" | xyseries Name N Value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am replacing the X and Y with xyseries, so I get dynamic column names. &lt;BR /&gt;
Is it possible to sort them?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2014 09:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179377#M51629</guid>
      <dc:creator>avitallange</dc:creator>
      <dc:date>2014-11-04T09:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dynamic column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179378#M51630</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | chart avg(Value) AS Value by Name | sort -Value | head 10 | eval N=Name | eval Name ="" | xyseries Name N Value | table *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Nov 2014 19:23:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179378#M51630</guid>
      <dc:creator>vasanthmss</dc:creator>
      <dc:date>2014-11-04T19:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dynamic column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179379#M51631</link>
      <description>&lt;P&gt;Thanks for your response but it didn't help.&lt;BR /&gt;
I am actually want to get my columns in the chart sorted.&lt;BR /&gt;
I.E. the most highest column will be the most left column and the most lowest columns will be the most right column.&lt;/P&gt;

&lt;P&gt;I am unable to do this because I used xyseries that replaced my axis and now each Value is a column and I cannot sort by this Value. Sort is working on column and now I need to sort by row.&lt;BR /&gt;
Is this possible?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2014 20:46:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179379#M51631</guid>
      <dc:creator>avitallange</dc:creator>
      <dc:date>2014-11-04T20:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dynamic column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179380#M51632</link>
      <description>&lt;P&gt;Try this workaround (it will add a rank to in the values of Name but will do the sorting)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | chart avg(Value) AS Value by Name| sort - Value| head 10 | eval rank=1 | accum rank | eval rank=rank-1| eval Name=rank." ".Name | eval rank="" | xyseries rank Name Value | table rank *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Nov 2014 21:33:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179380#M51632</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-11-04T21:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dynamic column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179381#M51633</link>
      <description>&lt;P&gt;This made the sort indeed.&lt;BR /&gt;
Thanks you!!!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2014 22:09:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/179381#M51633</guid>
      <dc:creator>avitallange</dc:creator>
      <dc:date>2014-11-04T22:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dynamic column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/674678#M230938</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/90919"&gt;@avitallange&lt;/a&gt;do you have any solution to sort from higher to lower for a dynamic columns in a chart?&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jan 2024 14:32:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/674678#M230938</guid>
      <dc:creator>avadhutha</dc:creator>
      <dc:date>2024-01-18T14:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to sort dynamic column names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/674686#M230941</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/252387"&gt;@avadhutha&lt;/a&gt;&lt;/SPAN&gt; -&lt;/P&gt;
&lt;P&gt;I’m a Community Moderator in the Splunk Community.&amp;nbsp;&lt;BR /&gt;This question was posted 10 years ago, so it might not get the attention you need for your question to be answered. We recommend that you post a new question so that your issue can get the &amp;nbsp;visibility it deserves. To increase your chances of getting help from the community, follow &lt;A href="http://docs.splunk.com/Documentation/Splunkbase/splunkbase/Answers/Questions" target="_blank"&gt;&lt;U&gt;these guidelines&lt;/U&gt;&lt;/A&gt; in the Splunk Answers User Manual when creating your post.&lt;/P&gt;
&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 15:01:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-sort-dynamic-column-names/m-p/674686#M230941</guid>
      <dc:creator>DanielPi</dc:creator>
      <dc:date>2024-01-18T15:01:56Z</dc:date>
    </item>
  </channel>
</rss>

