<?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 I Add LatestEvent Column to a Sparkline Chart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Add-LatestEvent-Column-to-a-Sparkline-Chart/m-p/419535#M120624</link>
    <description>&lt;P&gt;@JordanPeterson can you try the following?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; eventtype=PS-* 
 | chart sparkline count latest(_time) as "Latest Event" by eventtype
 | fieldformat "Latest Event"=strftime('Latest Event',"%Y/%m/%d %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 23 Aug 2018 02:54:39 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-08-23T02:54:39Z</dc:date>
    <item>
      <title>How Do I Add LatestEvent Column to a Sparkline Chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Add-LatestEvent-Column-to-a-Sparkline-Chart/m-p/419534#M120623</link>
      <description>&lt;P&gt;I have a search that is currently working to give me a spark line for different event types. The search looks like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`eventtype=PS-* 
| chart sparkline count by eventtype` 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I can take the fields from the chart and pipe that to table and it works fine too. What I want to do is add a "Latest" column for each EventType that displays the date of the most recent event for each event type. From there I'd also like to add a "First" field as well. &lt;/P&gt;

&lt;P&gt;I've tried using stats and eval but those both seem to break the sparkline.  &lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 22:26:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Add-LatestEvent-Column-to-a-Sparkline-Chart/m-p/419534#M120623</guid>
      <dc:creator>JordanPeterson</dc:creator>
      <dc:date>2018-08-22T22:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Add LatestEvent Column to a Sparkline Chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Add-LatestEvent-Column-to-a-Sparkline-Chart/m-p/419535#M120624</link>
      <description>&lt;P&gt;@JordanPeterson can you try the following?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; eventtype=PS-* 
 | chart sparkline count latest(_time) as "Latest Event" by eventtype
 | fieldformat "Latest Event"=strftime('Latest Event',"%Y/%m/%d %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Aug 2018 02:54:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Add-LatestEvent-Column-to-a-Sparkline-Chart/m-p/419535#M120624</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-23T02:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: How Do I Add LatestEvent Column to a Sparkline Chart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Add-LatestEvent-Column-to-a-Sparkline-Chart/m-p/419536#M120625</link>
      <description>&lt;P&gt;@niketnilay That worked perfectly. Thank you. &lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 20:23:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-Do-I-Add-LatestEvent-Column-to-a-Sparkline-Chart/m-p/419536#M120625</guid>
      <dc:creator>JordanPeterson</dc:creator>
      <dc:date>2018-08-23T20:23:00Z</dc:date>
    </item>
  </channel>
</rss>

