<?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: Creating a table with chronological headers in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-table-with-chronological-headers/m-p/399161#M190852</link>
    <description>&lt;P&gt;try below:&lt;BR /&gt;
| eval date = strftime(_time,"%Y%m%d-%b")&lt;BR /&gt;&lt;BR /&gt;
| chart latest(Value)  over Category by date&lt;/P&gt;

&lt;P&gt;An example similar to yours with internal index&lt;BR /&gt;
index=_internal earliest=-7d@d latest=now| eval display_time = strftime(_time,"%Y%m%d-%b") | chart latest(log_level) over sourcetype by display_time &lt;/P&gt;

&lt;P&gt;The strftime conversation can be changed as needed&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:21:28 GMT</pubDate>
    <dc:creator>chinmoya</dc:creator>
    <dc:date>2020-09-30T01:21:28Z</dc:date>
    <item>
      <title>Creating a table with chronological headers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-table-with-chronological-headers/m-p/399160#M190851</link>
      <description>&lt;P&gt;Given a week worth of timestamped data like the following:&lt;/P&gt;

&lt;P&gt;1st FEB&lt;BR /&gt;
Time = "010219 0100" Category = "A" Value = "1.1"&lt;BR /&gt;
Time = "010219 0100" Category = "B" Value = "1.3"&lt;BR /&gt;
Time = "010219 0110" Category = "A" Value = "2.1" &amp;lt;- Last data for A on 1st FEB&lt;BR /&gt;
Time = "010219 0110" Category = "B" Value = "2.2" &amp;lt;- Last data for B on 1st FEB&lt;/P&gt;

&lt;P&gt;2nd FEB&lt;BR /&gt;
Time = "020219 0100" Category = "A" Value = "1.1"&lt;BR /&gt;
Time = "020219 0100" Category = "B" Value = "1.3"&lt;BR /&gt;
Time = "020219 0110" Category = "A" Value = "1.1" &amp;lt;- Last data for A on 2nd FEB&lt;BR /&gt;
Time = "020219 0110" Category = "B" Value = "1.2" &amp;lt;- Last data for B on 2nd FEB&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;Assuming my keys are extracted correctly, how can I display a table of this format:&lt;BR /&gt;
Category    01-FEB      02-FEB...&lt;BR /&gt;
A       2.1     1.1&lt;BR /&gt;
B       2.2     1.2&lt;/P&gt;

&lt;P&gt;I am able to get to this point with the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;Base Search&amp;gt;
| dedup date_mday, date_month, TagName
| eval date = strftime(_time,"%Y%m%d-%b")
| xyseries TagName, date, Value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and get the following results:&lt;BR /&gt;
Category    20190219-Feb        20190219-Feb&lt;BR /&gt;
A       2.1         1.1&lt;BR /&gt;
B       2.2         1.2&lt;/P&gt;

&lt;P&gt;How can I rename manipulate the header such that they are all in chronological order with the correct header names? For context, the data will be searched for an entire year. I was able to get close to the presentation but encountered an ordering issue, for example, all the 01-X grouped together, 01-JAN, 01-FEB, 01-MAR and so on&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 11:42:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-table-with-chronological-headers/m-p/399160#M190851</guid>
      <dc:creator>Stevelim</dc:creator>
      <dc:date>2019-07-17T11:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a table with chronological headers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-table-with-chronological-headers/m-p/399161#M190852</link>
      <description>&lt;P&gt;try below:&lt;BR /&gt;
| eval date = strftime(_time,"%Y%m%d-%b")&lt;BR /&gt;&lt;BR /&gt;
| chart latest(Value)  over Category by date&lt;/P&gt;

&lt;P&gt;An example similar to yours with internal index&lt;BR /&gt;
index=_internal earliest=-7d@d latest=now| eval display_time = strftime(_time,"%Y%m%d-%b") | chart latest(log_level) over sourcetype by display_time &lt;/P&gt;

&lt;P&gt;The strftime conversation can be changed as needed&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:21:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-table-with-chronological-headers/m-p/399161#M190852</guid>
      <dc:creator>chinmoya</dc:creator>
      <dc:date>2020-09-30T01:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a table with chronological headers</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-table-with-chronological-headers/m-p/399162#M190853</link>
      <description>&lt;P&gt;The issue with this technique is that I need the format to be 22-Jul for example. Changing the eval strtime command to strftime(_time,"%d-%b")  works but only for a month of data. I eventually need this to go over a year worth of data which will end up with this arrangement of headers if I go with this:&lt;/P&gt;

&lt;P&gt;01-JAN | 01-FEB .. | 01-DEC | 02-JAN | &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 13:37:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-table-with-chronological-headers/m-p/399162#M190853</guid>
      <dc:creator>Stevelim</dc:creator>
      <dc:date>2019-07-22T13:37:47Z</dc:date>
    </item>
  </channel>
</rss>

