<?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: create a chart from a csv in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340824#M101072</link>
    <description>&lt;P&gt;thanks, that worked.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2017 17:20:53 GMT</pubDate>
    <dc:creator>chadman</dc:creator>
    <dc:date>2017-12-18T17:20:53Z</dc:date>
    <item>
      <title>create a chart from a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340821#M101069</link>
      <description>&lt;P&gt;I have  a csv file that Splunk ingest and use it to create a chart.  It works ok, but I'm not sure how to sort this by date since the data in the csv is not in a real date format.  the csv looks like:&lt;/P&gt;

&lt;P&gt;Month,Webcam,Speech&lt;BR /&gt;
July-17,10566,1255&lt;BR /&gt;
August-17,10612,1248&lt;BR /&gt;
September-17,10703,1263&lt;BR /&gt;
October-17,10770,1260&lt;BR /&gt;
November-17,10872,1267&lt;/P&gt;

&lt;P&gt;and this data goes back a few years.  Is there a way I can still have it sort by the month/year in my chart?  Currently have it sort by a count that so far as gone up.  That works for now, but the number could go down and put the months out of order.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 19:53:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340821#M101069</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2017-12-14T19:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: create a chart from a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340822#M101070</link>
      <description>&lt;P&gt;I'd convert &lt;CODE&gt;Month&lt;/CODE&gt; to a time field with a little bit of data massaging:&lt;BR /&gt;
&lt;CODE&gt;| eval time=strptime("01-".Month, "%d-%B-%y")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;What I'm doing there is appending "01-" to the start of the &lt;CODE&gt;month&lt;/CODE&gt; string before converting it with&lt;CODE&gt;strptime&lt;/CODE&gt;, because (to the best of my knowledge) &lt;CODE&gt;strptime&lt;/CODE&gt; requires at least day, month, and year in order to create a valid timestamp. Since you only have one entry per month in your sample data, that should work fine. Then you can just sort based on the &lt;CODE&gt;time&lt;/CODE&gt; field:&lt;BR /&gt;
&lt;CODE&gt;| sort - time&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 20:39:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340822#M101070</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-12-14T20:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: create a chart from a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340823#M101071</link>
      <description>&lt;P&gt;I'd suggest using strptime  to convert the date field to epoch time, then sorting on the epoch field. The example below assumes that the field containing your date is called 'date':&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;base search | eval epoch=strptime(date, "%B-%y") | sort epoch
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Dec 2017 20:46:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340823#M101071</guid>
      <dc:creator>LeeSart</dc:creator>
      <dc:date>2017-12-14T20:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: create a chart from a csv</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340824#M101072</link>
      <description>&lt;P&gt;thanks, that worked.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2017 17:20:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-a-chart-from-a-csv/m-p/340824#M101072</guid>
      <dc:creator>chadman</dc:creator>
      <dc:date>2017-12-18T17:20:53Z</dc:date>
    </item>
  </channel>
</rss>

