<?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 based on first count generated by xyseries dynamically in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sort-based-on-first-count-generated-by-xyseries-dynamically/m-p/322600#M96307</link>
    <description>&lt;P&gt;Hi - You can use the value of another field as the name of the destination field by using curly brackets, { }. For example, if you have an event with the following fields, aName=counter and aValue=1234. Use | eval {aName}=aValue to return counter=1234. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Eval"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Eval&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Add a dynamic eval |eval {xxxx}=value, then | sort  -eval {xxxx}&lt;/P&gt;</description>
    <pubDate>Sun, 22 Oct 2017 11:08:28 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2017-10-22T11:08:28Z</dc:date>
    <item>
      <title>Sort based on first count generated by xyseries dynamically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-based-on-first-count-generated-by-xyseries-dynamically/m-p/322599#M96306</link>
      <description>&lt;P&gt;I want to sort based on the 2nd column generated dynamically post using xyseries command &lt;BR /&gt;
&lt;CODE&gt;index="aof_mywizard_deploy_idx" sourcetype="aof_tm_source" | rename "Timelines_&lt;EM&gt;FY17&lt;/EM&gt; FY18_Q1" as "Completetion_date" |eval c_status=upper('Current Week Status') |search c_status!="TBC"| stats count(c_status) as count by  Completetion_date c_status |eventstats sum(count) as Total by Completetion_date| eval ragcount% = (round((count/Total)&lt;EM&gt;100))."%"| xyseries c_status Completetion_date count ragcount%|rename "count: *" as "&lt;/EM&gt;:Count" "ragcount%: &lt;EM&gt;" as "&lt;/EM&gt;:Percent%"  |table c_status *|rename c_status as "RAG STATUS" &lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Columns generated are Rag status, FY17:Count FY17:percent%  Fy18-Q1:count.. etc. I want to sort with the first count (in this case FY17:Count) . How can i  do that? can some one please help?  if i give sort - "FY17:Count" it works.. but since its dynamically generated , is there a way to handle this? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:23:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-based-on-first-count-generated-by-xyseries-dynamically/m-p/322599#M96306</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2020-09-29T16:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Sort based on first count generated by xyseries dynamically</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sort-based-on-first-count-generated-by-xyseries-dynamically/m-p/322600#M96307</link>
      <description>&lt;P&gt;Hi - You can use the value of another field as the name of the destination field by using curly brackets, { }. For example, if you have an event with the following fields, aName=counter and aValue=1234. Use | eval {aName}=aValue to return counter=1234. &lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Eval"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Eval&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Add a dynamic eval |eval {xxxx}=value, then | sort  -eval {xxxx}&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2017 11:08:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sort-based-on-first-count-generated-by-xyseries-dynamically/m-p/322600#M96307</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-10-22T11:08:28Z</dc:date>
    </item>
  </channel>
</rss>

