<?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 do you display days in chronological order not alphabetically? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440171#M174012</link>
    <description>&lt;P&gt;This did not work for me. It returned the same results. &lt;/P&gt;</description>
    <pubDate>Tue, 18 Dec 2018 18:14:37 GMT</pubDate>
    <dc:creator>cwhurd1</dc:creator>
    <dc:date>2018-12-18T18:14:37Z</dc:date>
    <item>
      <title>How do you display days in chronological order not alphabetically?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440168#M174009</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am using the below search to display the average transactions by day over a couple weeks. I need the days to show in chronological order. I have seen the Splunk Documentation, and I am still not able to figure it out. Any advice will be beneficial:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=XXX sourcetype=XXXXX
| timechart span=1h dc(transactionID) as transactions
| eval weekday=strftime(_time,"%A")
| eval hour=strftime(_time,"%H")
| chart avg(transactions) as transactions by hour, weekday
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Dec 2018 17:10:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440168#M174009</guid>
      <dc:creator>cwhurd1</dc:creator>
      <dc:date>2018-12-18T17:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do you display days in chronological order not alphabetically?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440169#M174010</link>
      <description>&lt;P&gt;@cwhurd1&lt;/P&gt;

&lt;P&gt;Can you please try below search?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=XXX sourcetype=XXXXX
 | timechart span=1h dc(transactionID) as transactions
 | eval weekday=strftime(_time,"%w")."_".strftime(_time,"%A")
 | eval hour=strftime(_time,"%H")
 | chart avg(transactions) as transactions by hour, weekday
 | rename 1_* as *,2_* as *,3_* as *,4_* as *,5_* as *,6_* as *,0_* as *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My Sample Search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=*
 | timechart span=1h count as transactions
 | eval weekday=strftime(_time,"%w")."_".strftime(_time,"%A")
 | eval hour=strftime(_time,"%H")
 | chart avg(transactions) as transactions by hour, weekday | rename 1_* as *,2_* as *,3_* as *,4_* as *,5_* as *,6_* as *,0_* as *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here we know Splunk displays column name in alphabetical order, so I have provided day number as initial character of weekday and then renamed it.&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 17:50:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440169#M174010</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-12-18T17:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do you display days in chronological order not alphabetically?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440170#M174011</link>
      <description>&lt;P&gt;@kamlesh_vaghela this will fail if Selected Time spans across multiple weeks as stated in the question &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;%w (Week day from 0-6) and %A (Week day from Sunday- Saturday) will match for same days of the week so they will appear next to each other.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 18:09:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440170#M174011</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-12-18T18:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do you display days in chronological order not alphabetically?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440171#M174012</link>
      <description>&lt;P&gt;This did not work for me. It returned the same results. &lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 18:14:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440171#M174012</guid>
      <dc:creator>cwhurd1</dc:creator>
      <dc:date>2018-12-18T18:14:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do you display days in chronological order not alphabetically?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440172#M174013</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=XXX sourcetype=XXXXX
 | timechart span=1h dc(transactionID) as transactions
 | eval weekday=strftime(_time,"%A")
 | eval hour=strftime(_time,"%H")
 | chart avg(transactions) as transactions by hour, weekday
| table hour Sunday Monday Tuesday Wednesday Thursday Friday Saturday
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Dec 2018 19:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440172#M174013</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-12-18T19:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do you display days in chronological order not alphabetically?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440173#M174014</link>
      <description>&lt;P&gt;This worked! Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Dec 2018 19:20:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-display-days-in-chronological-order-not/m-p/440173#M174014</guid>
      <dc:creator>cwhurd1</dc:creator>
      <dc:date>2018-12-18T19:20:27Z</dc:date>
    </item>
  </channel>
</rss>

