<?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 get a count of last Status in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344760#M102137</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;
let me better understand your request:&lt;BR /&gt;
each ID can have different status and you want to count only the occurrences of last status of each ID, correct?&lt;BR /&gt;
If this is your request try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search 
| stats latest(STATUS) AS STATUS by ID 
| stats count by STATUS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2017 09:27:45 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-08-02T09:27:45Z</dc:date>
    <item>
      <title>How get a count of last Status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344757#M102134</link>
      <description>&lt;P&gt;I trying figure out what is the best search query for reporting on the count of different unique status.&lt;BR /&gt;
Following  is the records:&lt;BR /&gt;
ID  NAME STATUS LASTUPDATEDTIME&lt;BR /&gt;
1    Group1  Started    12:15&lt;BR /&gt;
1    Group1  Processing  12:30&lt;BR /&gt;
1    Group1  Transfering  12:45&lt;BR /&gt;
1    Group1  Completed   1:06&lt;BR /&gt;
2    Group1  Started    12:17&lt;BR /&gt;
2    Group1  Processing  12:32&lt;BR /&gt;
2    Group1  Transfering  12:46&lt;BR /&gt;
3    Group1  Started    12:55&lt;/P&gt;

&lt;P&gt;When I try   | stats count by STATUS - it does give me the correct numbers.&lt;BR /&gt;
I am looking for the result:&lt;/P&gt;

&lt;P&gt;Started - 1&lt;BR /&gt;
Completed - 1&lt;BR /&gt;
Transferring - 1&lt;/P&gt;

&lt;P&gt;I want to report count of last Status.&lt;/P&gt;

&lt;P&gt;Thank you.  &lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 01:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344757#M102134</guid>
      <dc:creator>t_splunk_d</dc:creator>
      <dc:date>2017-08-02T01:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: How get a count of last Status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344758#M102135</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/41046"&gt;@t_splunk_d&lt;/a&gt;, &lt;CODE&gt;| stats count by STATUS&lt;/CODE&gt; should be best way of finding count based on different unique status. Is there any issue that you are facing when you run this command?  &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344758#M102135</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T15:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: How get a count of last Status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344759#M102136</link>
      <description>&lt;P&gt;count of last status will always give you 1 if i understand the question correctly...&lt;BR /&gt;
try the following, considering ID field is ID:&lt;BR /&gt;
    ... |stats lastest(STATUS) by ID&lt;BR /&gt;
hope it helps&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 09:22:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344759#M102136</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-08-02T09:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: How get a count of last Status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344760#M102137</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
let me better understand your request:&lt;BR /&gt;
each ID can have different status and you want to count only the occurrences of last status of each ID, correct?&lt;BR /&gt;
If this is your request try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search 
| stats latest(STATUS) AS STATUS by ID 
| stats count by STATUS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 09:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-get-a-count-of-last-Status/m-p/344760#M102137</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-02T09:27:45Z</dc:date>
    </item>
  </channel>
</rss>

