<?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: Use aggregate function latest for each minute to use timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475634#M192589</link>
    <description>&lt;P&gt;The best way would be to append to this result. But a seperate search would be fine too.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2019 07:57:09 GMT</pubDate>
    <dc:creator>wvanloon</dc:creator>
    <dc:date>2019-11-07T07:57:09Z</dc:date>
    <item>
      <title>Use aggregate function latest for each minute to use timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475628#M192583</link>
      <description>&lt;P&gt;My data looks like this:&lt;/P&gt;

&lt;P&gt;_time:11/5/1912:41:00 &lt;BR /&gt;
ID: 123 &lt;BR /&gt;
Value:10&lt;/P&gt;

&lt;P&gt;For each minute I want to know the last value that was known in that minute. How can I achieve this?&lt;BR /&gt;
The ID is not updated every minute, so if the latest value for a given id at the moment 12:41 is 10 I want the same number for 12:42.&lt;/P&gt;

&lt;P&gt;I've tried something like this:&lt;BR /&gt;
index="" | bin span=1m _time | streamstats current=f window=1440 last(value) AS last_value by id &lt;/P&gt;

&lt;P&gt;But I have the feeling I am missing a part.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475628#M192583</guid>
      <dc:creator>wvanloon</dc:creator>
      <dc:date>2020-09-30T02:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Use aggregate function latest for each minute to use timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475629#M192584</link>
      <description>&lt;P&gt;Does adding _time at the end of your &lt;CODE&gt;by id&lt;/CODE&gt; clause help?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;by id _time&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 17:30:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475629#M192584</guid>
      <dc:creator>marycordova</dc:creator>
      <dc:date>2019-11-05T17:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Use aggregate function latest for each minute to use timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475630#M192585</link>
      <description>&lt;P&gt;No that is not working. The problem is that if you group by id and _time it will not find the latest value before that time if the value for that minute doesn't exist.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 08:40:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475630#M192585</guid>
      <dc:creator>wvanloon</dc:creator>
      <dc:date>2019-11-06T08:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use aggregate function latest for each minute to use timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475631#M192586</link>
      <description>&lt;P&gt;I think what you're looking for is this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = someindex
| fields _time, value, id
| timechart span=1m latest(value) as value by id limit=0
| filldown
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If this id has never had a value in the selected time range, then it won't show up.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 12:07:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475631#M192586</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-11-06T12:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Use aggregate function latest for each minute to use timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475632#M192587</link>
      <description>&lt;P&gt;Thanks this is the beginning for what I was looking for.&lt;/P&gt;

&lt;P&gt;After this search I want to be able to count the occurrence of each value by time, any idea?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 13:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475632#M192587</guid>
      <dc:creator>wvanloon</dc:creator>
      <dc:date>2019-11-06T13:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Use aggregate function latest for each minute to use timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475633#M192588</link>
      <description>&lt;P&gt;You're welcome.&lt;/P&gt;

&lt;P&gt;The occurrence, is this going to be a separate search? or you want to append to the results of this search?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 01:24:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475633#M192588</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-11-07T01:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Use aggregate function latest for each minute to use timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475634#M192589</link>
      <description>&lt;P&gt;The best way would be to append to this result. But a seperate search would be fine too.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 07:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Use-aggregate-function-latest-for-each-minute-to-use-timechart/m-p/475634#M192589</guid>
      <dc:creator>wvanloon</dc:creator>
      <dc:date>2019-11-07T07:57:09Z</dc:date>
    </item>
  </channel>
</rss>

