<?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 How to create a single value timechart after stats? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431441#M123323</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm doing a device count based on device latest time event registration.  I'm getting the correct device registration count here on a single value (ex. 1000 count) filed but with no trending:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index.... ... earliest=-1mon
| stats count latest(_time) as last_update by device_name EventType
| search EventType="Registered"
| stats count(device_name) as Device_Count by last_update
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like create a single value visualization to show trend of device registration compared to 2 weeks ago count.  I tried the following but I'm not getting the same count as my device registration.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index.... ... earliest=-1mon
| stats count latest(_time) as last_update by device_name EventType _time
| search EventType="Registered"
| stats count(device_name) as Device_Count by last_update
| timechart span=2w count(Device_Count)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I fix this to show trend of the correct count of registered devices compared to 2-weeks ago?&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2019 19:25:12 GMT</pubDate>
    <dc:creator>alc2019</dc:creator>
    <dc:date>2019-03-13T19:25:12Z</dc:date>
    <item>
      <title>How to create a single value timechart after stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431441#M123323</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm doing a device count based on device latest time event registration.  I'm getting the correct device registration count here on a single value (ex. 1000 count) filed but with no trending:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index.... ... earliest=-1mon
| stats count latest(_time) as last_update by device_name EventType
| search EventType="Registered"
| stats count(device_name) as Device_Count by last_update
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like create a single value visualization to show trend of device registration compared to 2 weeks ago count.  I tried the following but I'm not getting the same count as my device registration.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index.... ... earliest=-1mon
| stats count latest(_time) as last_update by device_name EventType _time
| search EventType="Registered"
| stats count(device_name) as Device_Count by last_update
| timechart span=2w count(Device_Count)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I fix this to show trend of the correct count of registered devices compared to 2-weeks ago?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 19:25:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431441#M123323</guid>
      <dc:creator>alc2019</dc:creator>
      <dc:date>2019-03-13T19:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single value timechart after stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431442#M123324</link>
      <description>&lt;P&gt;@alc2019,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index.... ... earliest=-1mon EventType="Registered"
 | timechart span=2w count(device_name) as device_count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Mar 2019 10:56:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431442#M123324</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-03-14T10:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single value timechart after stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431443#M123325</link>
      <description>&lt;P&gt;Hi Renjith,&lt;/P&gt;

&lt;P&gt;Thanks for the help but it will not work on my case as those devices register multiple times in a day and I have to count the registration based on their latest registration time.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 14:34:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431443#M123325</guid>
      <dc:creator>alc2019</dc:creator>
      <dc:date>2019-03-14T14:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single value timechart after stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431444#M123326</link>
      <description>&lt;P&gt;@alc2019,&lt;BR /&gt;
What about &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      index.... ... earliest=-1mon EventType="Registered"
     |stats latest(_time) as _time by device_name
      | timechart span=2w count(device_name) as device_count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Mar 2019 14:39:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431444#M123326</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-03-14T14:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a single value timechart after stats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431445#M123327</link>
      <description>&lt;P&gt;Perfect - works!&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 03:40:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-single-value-timechart-after-stats/m-p/431445#M123327</guid>
      <dc:creator>alc2019</dc:creator>
      <dc:date>2019-03-15T03:40:25Z</dc:date>
    </item>
  </channel>
</rss>

