<?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: Table with count and latest date in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575866#M200677</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230331"&gt;@giuces&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; stats count(eval(action="accepted)) AS "Total Accepted" count(eval(action="rejected)) AS "Total rejected" latest(eval(if(action="rejected", _time, NULL()))) AS "Latest Rejected" by product | rename product AS Product&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 22 Nov 2021 13:20:16 GMT</pubDate>
    <dc:creator>aasabatini</dc:creator>
    <dc:date>2021-11-22T13:20:16Z</dc:date>
    <item>
      <title>Table with count and latest date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575096#M200393</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;i need to create a table that count for every product how many events are accepted or rejected.&lt;/P&gt;&lt;P&gt;In addition to this fields the latest event date should be shown with the count. Table should be like this&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;Product&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;Latest Accepted&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;Total Accepted&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;Latest Rejected&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;Total Rejected&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;Bike&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;10/11/2021&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;35&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;12/11/2021&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="20%" height="25px"&gt;Skate&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;11/11/2021&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;99&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;13/11/2021&lt;/TD&gt;&lt;TD width="20%" height="25px"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the first part of the query is pretty easy:&lt;/P&gt;&lt;P&gt;...| stats count(eval(action="accepted)) AS "Total Accepted"&amp;nbsp;count(eval(action="rejected)) AS "Total rejected" by product | rename product AS Product&lt;/P&gt;&lt;P&gt;I'm not able to retrieve the latest date for every&amp;nbsp; kind of action, tried with latest(_time) without success.&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 17:25:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575096#M200393</guid>
      <dc:creator>giuces</dc:creator>
      <dc:date>2021-11-16T17:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Table with count and latest date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575097#M200394</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230331"&gt;@giuces&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try the stats function like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;stats latest(eval(if(action="rejected", _time, NULL()))) AS "Latest Rejected"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ale&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 17:33:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575097#M200394</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-11-16T17:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: Table with count and latest date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575102#M200396</link>
      <description>&lt;P&gt;thanks aasabatini,&lt;/P&gt;&lt;P&gt;i'm little be confused where do i have to insert portion of search yo suggest in the old one&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;...| stats count(eval(action="accepted)) AS "Total Accepted"&amp;nbsp;count(eval(action="rejected)) AS "Total rejected" by product | rename product AS Product | table Product "Total Accepted" "Total Rejected" ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 17:54:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575102#M200396</guid>
      <dc:creator>giuces</dc:creator>
      <dc:date>2021-11-16T17:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Table with count and latest date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575866#M200677</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230331"&gt;@giuces&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; stats count(eval(action="accepted)) AS "Total Accepted" count(eval(action="rejected)) AS "Total rejected" latest(eval(if(action="rejected", _time, NULL()))) AS "Latest Rejected" by product | rename product AS Product&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 Nov 2021 13:20:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Table-with-count-and-latest-date/m-p/575866#M200677</guid>
      <dc:creator>aasabatini</dc:creator>
      <dc:date>2021-11-22T13:20:16Z</dc:date>
    </item>
  </channel>
</rss>

